Skip to content

Commit

Permalink
clear conversation message when remove conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
siqiii committed Jan 2, 2020
1 parent 9d8b453 commit 42a531b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ public void onSendPrepare(Message message, long savedTime) {
}
}

public void removeConversation(ConversationInfo conversationInfo) {
public void removeConversation(ConversationInfo conversationInfo, boolean clearMsg) {
ChatManager.Instance().clearUnreadStatus(conversationInfo.conversation);
ChatManager.Instance().removeConversation(conversationInfo.conversation, false);
ChatManager.Instance().removeConversation(conversationInfo.conversation, clearMsg);
}

public void clearMessages(Conversation conversation) {
Expand All @@ -198,7 +198,7 @@ public void unSubscribeChannel(ConversationInfo conversationInfo) {
ChatManager.Instance().listenChannel(conversationInfo.conversation.target, false, new GeneralCallback() {
@Override
public void onSuccess() {
removeConversation(conversationInfo);
removeConversation(conversationInfo, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void onClick(View itemView) {
confirmPrompt = "确认删除会话?",
priority = 0)
public void removeConversation(View itemView, ConversationInfo conversationInfo) {
conversationListViewModel.removeConversation(conversationInfo);
conversationListViewModel.removeConversation(conversationInfo, true);
}

@ConversationContextMenuItem(tag = ConversationContextMenuItemTags.TAG_REMOVE,
Expand Down

0 comments on commit 42a531b

Please sign in to comment.