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)); + } + /** * 请求接口获取是否展示 */