快速切换账号 聊天室加入失败 返回-1 重启app就好了 可以正常加入

繁华 2020-12-9 520

切换账号时: ChatManagerHolder.gChatManager.connect(loginData.getData().getMemberId(), loginData.getData().getIm_token()); EventBus.getDefault().post(new MessageEvent("changeaccount"));

收到信息时:

  case "changeaccount":                 String customerId = PreferencesUtil.get(getActivity(), Constants.PreferencesUtilKey.KeFuId, "").toString();                 Log.e("切换","==="+customerId);                 String roomId  = PreferencesUtil.get(getActivity(), Constants.PreferencesUtilKey.roomId, "").toString();                 userViewModel.getUserInfoAsync(customerId, true)                         .observe(this, info -> {                             if (info != null) {                                 updateUserInfo(info);                             }                         });                 conversation = new Conversation(Conversation.ConversationType.ChatRoom, roomId);                 setupConversation(conversation, "", -1, null);

上传的附件:
最新回复 (0)
返回