Browse Source

fix: 麦位占位图

tongmengxiao 5 months ago
parent
commit
170eddda16

+ 10 - 0
baseswago/src/main/java/com/swago/baseswago/model/live/RoomModel.java

@@ -60,6 +60,8 @@ public class RoomModel {
     private String badge_special;
     private String badge_special;
     private String chat_special;
     private String chat_special;
 
 
+    private String broadcast_head_special;
+
     private CusNewMsgBean<RoomUserChangeModel> join_im_data;
     private CusNewMsgBean<RoomUserChangeModel> join_im_data;
 
 
     public String getRtc_token() {
     public String getRtc_token() {
@@ -317,4 +319,12 @@ public class RoomModel {
     public void setChat_special(String chat_special) {
     public void setChat_special(String chat_special) {
         this.chat_special = chat_special;
         this.chat_special = chat_special;
     }
     }
+
+    public String getBroadcast_head_special() {
+        return broadcast_head_special;
+    }
+
+    public void setBroadcast_head_special(String broadcast_head_special) {
+        this.broadcast_head_special = broadcast_head_special;
+    }
 }
 }

BIN
baseswago/src/main/res/mipmap-xxhdpi/ic_audio_lock.png


BIN
baseswago/src/main/res/mipmap-xxhdpi/ic_audio_seat.png


+ 2 - 2
room/src/main/java/com/swago/room/adapter/RoomUserAdapter.kt

@@ -31,9 +31,9 @@ class RoomUserAdapter : BaseQuickAdapter<RoomUserModel.ListBean,BaseViewHolder>(
                 .placeholder(R.mipmap.default_avatar)
                 .placeholder(R.mipmap.default_avatar)
                 .error(R.mipmap.default_avatar).into(ivAvatar)
                 .error(R.mipmap.default_avatar).into(ivAvatar)
 
 
-            if (!item.android_head_special.isNullOrEmpty()){
+            if (!item.android_head_special.isNullOrEmpty() || !item.head_special.isNullOrEmpty()){
                 svgAvatar.visibility = View.VISIBLE
                 svgAvatar.visibility = View.VISIBLE
-                svgaParser.decodeFromURL(URL(item.android_head_special), object :SVGAParser.ParseCompletion{
+                svgaParser.decodeFromURL(URL(if (item.android_head_special.isNullOrEmpty()) item.head_special else item.android_head_special), object :SVGAParser.ParseCompletion{
                     override fun onComplete(videoItem: SVGAVideoEntity) {
                     override fun onComplete(videoItem: SVGAVideoEntity) {
                         val drawable = SVGADrawable(videoItem)
                         val drawable = SVGADrawable(videoItem)
                         svgAvatar.setImageDrawable(drawable)
                         svgAvatar.setImageDrawable(drawable)

+ 1 - 1
room/src/main/java/com/swago/room/bean/UserRoomModel.kt

@@ -200,7 +200,7 @@ class UserRoomModel : IRoomInfo {
 
 
     override fun getHeadSpecial(): String {
     override fun getHeadSpecial(): String {
         return if (RoleType.user == SwagoRoomManager.roleType) {
         return if (RoleType.user == SwagoRoomManager.roleType) {
-            momentModel?.head_special ?: ""
+            roomModel?.broadcast_head_special ?: ""
         } else {
         } else {
             roomModel?.head_special ?: ""
             roomModel?.head_special ?: ""
         }
         }