tongmengxiao vor 6 Monaten
Ursprung
Commit
fa2905478d

+ 1 - 1
baseswago/src/main/java/com/swago/baseswago/constant/UrlConstant.kt

@@ -18,7 +18,7 @@ object UrlConstant {
 //          "http:huawei.swago.cn"
 //        "https://pro-api.swago.cn"
     } else {
-        "https://pro-api.swago.cn"
+        "https://apiv.swago.cn"
     }
 
     private val BASE_WEB_URL by lazy {

+ 19 - 15
room/src/main/java/com/swago/room/base/BaseComFragment.kt

@@ -463,6 +463,19 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
                 gameList.addAll(gameData)
             }
         }
+        //推荐游戏列表
+        roomVm.recommendGameListModelLiveData.observe(this){
+                binding.playBannerView.setData(it.list)
+                binding.playBannerView.jumpToWebFun = { game ->
+                    setRecommendGame(game)
+
+                }
+                binding.videoPlayBannerView.setData(it.list)
+                binding.videoPlayBannerView.jumpToWebFun = { game ->
+                    setRecommendGame(game)
+
+                }
+        }
 
         //直播间配置
         roomVm.roomConfigLiveData.observe(this) {
@@ -781,21 +794,12 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
         }
 
         //推荐游戏列表
-        roomVm.recommendGameListModelLiveData.observe(this){
-            if (iRoomInfo.getRoomType() == RoomType.AUDIO.type){
-                binding.playBannerView.setData(it.list)
-                binding.playBannerView.jumpToWebFun = { game ->
-                    setRecommendGame(game)
-
-                }
-            } else if (iRoomInfo.getRoomType() == RoomType.VIDEO.type){
-                binding.videoPlayBannerView.setData(it.list)
-                binding.videoPlayBannerView.jumpToWebFun = { game ->
-                    setRecommendGame(game)
-
-                }
-            }
-
+        if (iRoomInfo.getRoomType() == RoomType.AUDIO.type){
+            binding.playBannerView.visibility = View.VISIBLE
+            binding.videoPlayBannerView.visibility = View.GONE
+        }  else if (iRoomInfo.getRoomType() == RoomType.VIDEO.type) {
+            binding.playBannerView.visibility = View.GONE
+            binding.videoPlayBannerView.visibility = View.VISIBLE
         }
 
     }

+ 1 - 1
room/src/main/java/com/swago/room/game/GamePlayDialog.kt

@@ -93,7 +93,7 @@ class GamePlayDialog : BaseXDFragment<DialogGamePlayBinding>(), IRoomActiveListe
                 val imageViewLayoutParams = ConstraintLayout.LayoutParams(DpPxUtil.dip2px(40f),DpPxUtil.dip2px(40f))
                 imageViewLayoutParams.bottomToBottom = R.id.cl
                 imageViewLayoutParams.startToStart = R.id.cl
-                imageViewLayoutParams.marginStart = DpPxUtil.dip2px(10f)
+                imageViewLayoutParams.marginStart = DpPxUtil.dip2px(35f)
                 imageViewLayoutParams.bottomMargin = DpPxUtil.dip2px(310f)
                 val imageView = ImageView(activity)
                 imageView.setBackgroundResource(R.drawable.shape_80000000_20)

+ 1 - 1
room/src/main/java/com/swago/room/vm/MsgVm.kt

@@ -683,6 +683,7 @@ class MsgVm(application: Application) : AbsMsgVm(application) {
                                 imGiftModel.giftId = it.giftId
                                 imGiftModel.giftOneceNum = it.giftOneceNum
                                 imGiftModel.senderAvatar = it.senderAvatar
+                                imGiftModel.isCombo = it.isCombo
                                 showGiftDanDao?.invoke(imGiftModel)
                             } else {
                                 if (it.giftType == 1 || it.giftType == 5){
@@ -694,7 +695,6 @@ class MsgVm(application: Application) : AbsMsgVm(application) {
                                     imGiftModel.giftOneceNum = it.giftOneceNum
                                     imGiftModel.senderAvatar = it.senderAvatar
 
-
                                     imGiftModel.giftIdName = it.giftIdName
                                     imGiftModel.giftName = it.giftName
                                     imGiftModel.giftArName = it.giftArName

+ 4 - 1
room/src/main/res/layout/layout_user_header_view.xml

@@ -269,6 +269,9 @@
         android:text="id"
         android:layout_marginEnd="12dp"
         android:textSize="@dimen/sp_12"
-        android:textColor="#66ffffff"/>
+        android:textColor="#66ffffff"
+        android:paddingStart="4dp"
+        android:paddingEnd="4dp"
+        android:background="@drawable/shape_20000000_41"/>
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 4 - 2
room/src/main/res/layout/layout_user_room.xml

@@ -57,12 +57,14 @@
     <ImageView
         android:id="@+id/ivClose"
         android:layout_marginEnd="10dp"
-        android:layout_marginTop="35dp"
+        android:layout_marginTop="30dp"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         android:src="@mipmap/close"
         android:layout_width="40dp"
-        android:layout_height="40dp"/>
+        android:layout_height="40dp"
+        android:background="@drawable/shape_20000000_41"
+        />
 
 
     <com.swago.room.widget.UserShowAnchorCloseView

+ 32 - 22
room/src/main/res/layout/view_item_gift.xml

@@ -83,31 +83,41 @@
             android:layout_width="80dp"
             android:layout_height="wrap_content"/>
 
-        <ImageView
-            android:id="@+id/ivGiftIcon"
-            android:src="@mipmap/default_avatar"
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:id="@+id/ll_count"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintStart_toStartOf="parent"
-            android:layout_marginStart="128dp"
-            app:layout_constraintEnd_toEndOf="parent"
-            android:layout_width="40dp"
-            android:layout_height="40dp"/>
+            android:layout_marginStart="180dp"
+            app:layout_constraintEnd_toEndOf="parent">
+            <ImageView
+                android:id="@+id/ivGiftIcon"
+                android:src="@mipmap/default_avatar"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                android:layout_width="40dp"
+                android:layout_height="40dp"/>
+
+            <TextView
+                android:id="@+id/tvNum"
+                android:textSize="18dp"
+                android:textColor="#fff"
+                android:text="x123456789"
+                android:visibility="invisible"
+                tools:visibility="visible"
+                android:textStyle="bold|italic"
+                app:layout_constraintLeft_toRightOf="@+id/ivGiftIcon"
+                app:layout_constraintTop_toTopOf="@+id/ll_count"
+                app:layout_constraintBottom_toBottomOf="@+id/ll_count"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"/>
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
 
-        <TextView
-            android:id="@+id/tvNum"
-            android:textSize="18dp"
-            android:textColor="#fff"
-            android:text="x123456789"
-            android:visibility="invisible"
-            tools:visibility="visible"
-            android:layout_marginStart="5dp"
-            android:textStyle="bold|italic"
-            app:layout_constraintTop_toTopOf="@+id/clContainer"
-            app:layout_constraintStart_toEndOf="@+id/ivGiftIcon"
-            app:layout_constraintBottom_toBottomOf="@+id/clContainer"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"/>
 
         <LinearLayout
             android:id="@+id/llNum"
@@ -116,7 +126,7 @@
             android:visibility="invisible"
             tools:visibility="visible"
             app:layout_constraintTop_toTopOf="@+id/clContainer"
-            app:layout_constraintStart_toEndOf="@+id/ivGiftIcon"
+            app:layout_constraintStart_toEndOf="@+id/ll_count"
             app:layout_constraintBottom_toBottomOf="@+id/clContainer"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content">

+ 3 - 2
tuikit/src/main/java/com/tencent/qcloud/tim/uikit/modules/chat/layout/message/holder/MessageContentHolder.java

@@ -10,6 +10,7 @@ import android.widget.ProgressBar;
 import android.widget.TextView;
 
 import com.bumptech.glide.Glide;
+import com.swago.baseswago.util.AppContext;
 import com.swago.baseswago.util.UserInfo;
 import com.tencent.imsdk.v2.V2TIMMessage;
 import com.tencent.qcloud.tim.uikit.R;
@@ -85,10 +86,10 @@ public abstract class MessageContentHolder extends MessageEmptyHolder {
         if (timMessage != null) {
             if (timMessage.isSelf()) {
                 if (UserInfo.INSTANCE.getUserInfo() != null) {
-                    Glide.with(itemView.getContext()).load(UserInfo.INSTANCE.getUserInfo().getUser_head_img_url()).placeholder(R.mipmap.default_avatar).error(R.mipmap.default_avatar).into(rightUserIcon);
+                    Glide.with(AppContext.getContext()).load(UserInfo.INSTANCE.getUserInfo().getUser_head_img_url()).placeholder(R.mipmap.default_avatar).error(R.mipmap.default_avatar).into(rightUserIcon);
                 }
             } else {
-                Glide.with(itemView.getContext()).load(timMessage.getFaceUrl()).placeholder(R.mipmap.default_avatar).error(R.mipmap.default_avatar).into(leftUserIcon);
+                Glide.with(AppContext.getContext()).load(timMessage.getFaceUrl()).placeholder(R.mipmap.default_avatar).error(R.mipmap.default_avatar).into(leftUserIcon);
             }
         }
         if (!TextUtils.isEmpty(timMessage.getNameCard())) {