From 1d660f6f39b9189f73916335cbe3620dc4e0c856 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 15 Aug 2022 15:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=87=E5=AF=BC=E5=91=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=B4=A6=E5=8F=B7=E6=8F=90=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/manager/IMLoginManager.java | 2 ++ .../yunbao/common/manager/NoviceInstructorManager.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index ed3233c56..27c88697d 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -178,6 +178,8 @@ public class IMLoginManager extends BaseCacheManager { deleteByKey(KEY_USER_INFO); deleteByKey(isNewUserGif); deleteByKey(isNewUserOne); + //清理指导员信息 + NoviceInstructorManager.get(context).deleteOfLogin(); //用户对象置空 userInfo = null; manager = null; diff --git a/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java b/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java index 519e20d2b..31f83484d 100644 --- a/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java +++ b/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java @@ -109,10 +109,10 @@ public class NoviceInstructorManager extends BaseCacheManager { //只有和指导员对话才可以清除信息 UserInfo model1 = RongUserInfoManager.getInstance().getUserInfo(targetId); IMLoginModel userModel = new Gson().fromJson(model1.getExtra(), IMLoginModel.class); - if (userModel!=null&&TextUtils.equals(userModel.getIsAdmin(), "1")) { + if (userModel != null && TextUtils.equals(userModel.getIsAdmin(), "1")) { IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo(); HttpClient.getInstance().get("Message.setZdyMsg", "setZdyMsg") - .params("uid", userInfo.getId(),true) + .params("uid", userInfo.getId(), true) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -124,6 +124,12 @@ public class NoviceInstructorManager extends BaseCacheManager { } } + //登出时清理指导员信息 + public void deleteOfLogin() { + deleteByKey(KEY_NOVICE_INSTRUCTOR); + EventBus.getDefault().post(new NoviceInstructorEvent().setShowHomeIcon(false)); + } + /** * 请求接口获取是否展示 */