登出时删除私聊类型聊天内容和会话

This commit is contained in:
18401019693 2022-08-15 15:51:06 +08:00
parent 1d660f6f39
commit 849e5ebaff

View File

@ -18,6 +18,9 @@ import com.yunbao.common.utils.SpUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import io.rong.imkit.IMCenter;
import io.rong.imlib.model.Conversation;
/** /**
* 登录者信息管理 * 登录者信息管理
*/ */
@ -183,8 +186,11 @@ public class IMLoginManager extends BaseCacheManager {
//用户对象置空 //用户对象置空
userInfo = null; userInfo = null;
manager = null; manager = null;
//删除私聊对话
IMCenter.getInstance().clearConversations(null, Conversation.ConversationType.PRIVATE);
RongcloudIMManager.logoutIM(); RongcloudIMManager.logoutIM();
MessageIMManager.get(context).logout(); MessageIMManager.get(context).logout();
} }
/** /**