MM 世界聊天
This commit is contained in:
@@ -289,8 +289,25 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
|
||||
}
|
||||
|
||||
// public void updateShiJieTeamInfo(List<Team> result) {
|
||||
// for (Team team : result) {
|
||||
// if (groupIds.contains(team.getId()) && conversationViewShiJie.getAdatper().getConversationList().size() == 0) {
|
||||
// List<ConversationBean> list = new ArrayList<>();
|
||||
// RecentContact recentContact = NIMClient.getService(MsgService.class).createEmptyRecentContact(team.getId(), SessionTypeEnum.SUPER_TEAM, 0, System.currentTimeMillis(), true, true);
|
||||
// ConversationInfo info = new ConversationInfo(recentContact);
|
||||
// info.setTeamInfo(team);
|
||||
// ConversationBean conversationBean = new ConversationBean(info);
|
||||
// conversationBean.isShiJie = true;
|
||||
// conversationBean.infoData.setTeamInfo(team);
|
||||
// conversationBean.infoData.setStickTop(true);
|
||||
// list.add(conversationBean);
|
||||
// conversationViewShiJie.setData(list);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
public void addShiJieConversation(Team team) {
|
||||
RecentContact recentContact = NIMClient.getService(MsgService.class).createEmptyRecentContact(team.getId(), SessionTypeEnum.Team, 0, System.currentTimeMillis(), true, true);
|
||||
RecentContact recentContact = NIMClient.getService(MsgService.class).createEmptyRecentContact(team.getId(), SessionTypeEnum.SUPER_TEAM, 0, System.currentTimeMillis(), true, true);
|
||||
ConversationInfo info = new ConversationInfo(recentContact);
|
||||
info.setTeamInfo(team);
|
||||
ConversationBean conversationBean = new ConversationBean(info);
|
||||
@@ -302,7 +319,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
boolean isAdd = false;
|
||||
for (ConversationBean conversationBean1 : conversationViewTop.getAdatper().getConversationList()) {
|
||||
Team team1 = conversationBean1.infoData.getTeamInfo();
|
||||
if (conversationBean1.isShiJie || (team1 != null && Objects.equals(team1.getId(), team.getId()))) {
|
||||
if (conversationBean1.infoData.getContactId().equals(team.getId())) {
|
||||
conversationBean1.infoData.setStickTop(true);
|
||||
conversationBean1.isShiJie = true;
|
||||
conversationBean1.infoData.setTeamInfo(team1 == null ? team : team1);
|
||||
@@ -320,7 +337,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
ConversationBean conversationBeanItem = null;
|
||||
|
||||
for (ConversationBean conversationBean1 : conversationViewTop.getAdatper().getConversationList()) {
|
||||
if (conversationBean1.infoData.getTeamInfo() != null && Objects.equals(conversationBean1.infoData.getTeamInfo().getId(), team.getId())) {
|
||||
if (conversationBean1.infoData.getContactId().equals(team.getId())) {
|
||||
conversationBean1.infoData.setStickTop(true);
|
||||
conversationBean1.isShiJie = true;
|
||||
conversationBeanItem = conversationBean1;
|
||||
@@ -330,7 +347,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
}
|
||||
|
||||
for (ConversationBean conversationBean1 : conversationViewBottom.getAdatper().getConversationList()) {
|
||||
if (conversationBean1.infoData.getTeamInfo() != null && Objects.equals(conversationBean1.infoData.getTeamInfo().getId(), team.getId())) {
|
||||
if (conversationBean1.infoData.getContactId().equals(team.getId())) {
|
||||
conversationBean1.infoData.setStickTop(true);
|
||||
conversationBean1.isShiJie = true;
|
||||
conversationBeanItem = conversationBean1;
|
||||
@@ -342,7 +359,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
|
||||
boolean isAdd = false;
|
||||
for (ConversationBean conversationBean1 : conversationViewShiJie.getAdatper().getConversationList()) {
|
||||
if (conversationBean1.infoData.getTeamInfo() != null && Objects.equals(conversationBean1.infoData.getTeamInfo().getId(), team.getId())) {
|
||||
if (conversationBean1.infoData.getContactId().equals(team.getId())) {
|
||||
conversationBean1.infoData.setStickTop(true);
|
||||
conversationBean1.isShiJie = true;
|
||||
isAdd = true;
|
||||
@@ -500,6 +517,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
LogUtils.d("shijie", "更新群组信息" + result.getData().size() + " conversation size==" + conversationViewTop.getDataSize());
|
||||
conversationViewTop.updateTeamInfo(result.getData());
|
||||
} else if (conversationType == 2) {
|
||||
// updateShiJieTeamInfo(result.getData());
|
||||
LogUtils.d("shijie", "更新群组信息" + result.getData().size() + " conversationshijie size==" + conversationViewShiJie.getDataSize());
|
||||
conversationViewTop.updateTeamInfoType(result.getData(), true);
|
||||
conversationViewBottom.updateTeamInfoType(result.getData(), false);
|
||||
|
||||
Reference in New Issue
Block a user