Ver código fonte

修改部分问题

Pq 2 meses atrás
pai
commit
fc68cb4916

+ 4 - 1
chatModule/src/main/java/com/cooleshow/chatmodule/bean/GroupMemberBean.java

@@ -176,6 +176,7 @@ public class GroupMemberBean extends BaseIndexPinyinBean implements Serializable
         dest.writeString(this.userId);
         dest.writeString(this.imUserId);
         dest.writeInt(this.itemType);
+        dest.writeValue(this.allowPrivateChatFlag);
         dest.writeString(this.groupRoleType);
     }
 
@@ -191,6 +192,7 @@ public class GroupMemberBean extends BaseIndexPinyinBean implements Serializable
         this.userId = source.readString();
         this.imUserId = source.readString();
         this.itemType = source.readInt();
+        this.allowPrivateChatFlag = (Boolean) source.readValue(Boolean.class.getClassLoader());
         this.groupRoleType = source.readString();
     }
 
@@ -209,10 +211,11 @@ public class GroupMemberBean extends BaseIndexPinyinBean implements Serializable
         this.userId = in.readString();
         this.imUserId = in.readString();
         this.itemType = in.readInt();
+        this.allowPrivateChatFlag = (Boolean) in.readValue(Boolean.class.getClassLoader());
         this.groupRoleType = in.readString();
     }
 
-    public static final Creator<GroupMemberBean> CREATOR = new Creator<GroupMemberBean>() {
+    public static final Parcelable.Creator<GroupMemberBean> CREATOR = new Parcelable.Creator<GroupMemberBean>() {
         @Override
         public GroupMemberBean createFromParcel(Parcel source) {
             return new GroupMemberBean(source);

+ 6 - 3
chatModule/src/main/java/com/cooleshow/chatmodule/ui/GroupMemberActivity.java

@@ -85,8 +85,8 @@ public class GroupMemberActivity extends BaseMVPActivity<TcActivityGroupMemberBi
         recyclerview.setRecycledViewPool(viewPool);
         viewPool.setMaxRecycledViews(0, 100);
 
-        EmptyViewLayout emptyViewLayout =new EmptyViewLayout(this);
-        emptyViewLayout.setContent(com.cooleshow.base.R.drawable.icon_empty_content,"暂无群聊成员~");
+        EmptyViewLayout emptyViewLayout = new EmptyViewLayout(this);
+        emptyViewLayout.setContent(com.cooleshow.base.R.drawable.icon_empty_content, "暂无群聊成员~");
         adapter = new GroupMemberAdapter(mDatas);
         adapter.setEmptyView(emptyViewLayout);
         recyclerview.setAdapter(adapter);
@@ -105,7 +105,10 @@ public class GroupMemberActivity extends BaseMVPActivity<TcActivityGroupMemberBi
                 if (TextUtils.equals(item.getImUserId(), imUserId)) {
                     return;
                 }
-                ChatHelper.getInstance().goChat(item.getImUserId(),item.getNickname());
+                if (!item.getAllowPrivateChatFlag()) {
+                    return;
+                }
+                ChatHelper.getInstance().goChat(item.getImUserId(), item.getNickname());
             }
         });