瀏覽代碼

fix: 麦位占位图

tongmengxiao 4 月之前
父節點
當前提交
266044fe6f

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

@@ -58,6 +58,8 @@ public class RoomModel {
     private String badge_special;
     private String chat_special;
 
+    private String broadcast_head_special;
+
     private CusNewMsgBean<RoomUserChangeModel> join_im_data;
 
     public String getRtc_token() {
@@ -315,4 +317,12 @@ public class RoomModel {
     public void setChat_special(String 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;
+    }
 }

二進制
baseswago/src/main/res/mipmap-xxhdpi/ic_audio_lock.jpg


二進制
baseswago/src/main/res/mipmap-xxhdpi/ic_audio_lock.png


二進制
baseswago/src/main/res/mipmap-xxhdpi/ic_audio_seat.jpg


二進制
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)
                 .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
-                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) {
                         val drawable = SVGADrawable(videoItem)
                         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 {
         return if (RoleType.user == SwagoRoomManager.roleType) {
-            momentModel?.head_special ?: ""
+            roomModel?.broadcast_head_special ?: ""
         } else {
             roomModel?.head_special ?: ""
         }