修复指导员切换账号提示问题
This commit is contained in:
parent
a453a526fa
commit
1d660f6f39
@ -178,6 +178,8 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
deleteByKey(KEY_USER_INFO);
|
deleteByKey(KEY_USER_INFO);
|
||||||
deleteByKey(isNewUserGif);
|
deleteByKey(isNewUserGif);
|
||||||
deleteByKey(isNewUserOne);
|
deleteByKey(isNewUserOne);
|
||||||
|
//清理指导员信息
|
||||||
|
NoviceInstructorManager.get(context).deleteOfLogin();
|
||||||
//用户对象置空
|
//用户对象置空
|
||||||
userInfo = null;
|
userInfo = null;
|
||||||
manager = null;
|
manager = null;
|
||||||
|
@ -109,10 +109,10 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
|||||||
//只有和指导员对话才可以清除信息
|
//只有和指导员对话才可以清除信息
|
||||||
UserInfo model1 = RongUserInfoManager.getInstance().getUserInfo(targetId);
|
UserInfo model1 = RongUserInfoManager.getInstance().getUserInfo(targetId);
|
||||||
IMLoginModel userModel = new Gson().fromJson(model1.getExtra(), IMLoginModel.class);
|
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();
|
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
||||||
HttpClient.getInstance().get("Message.setZdyMsg", "setZdyMsg")
|
HttpClient.getInstance().get("Message.setZdyMsg", "setZdyMsg")
|
||||||
.params("uid", userInfo.getId(),true)
|
.params("uid", userInfo.getId(), true)
|
||||||
.execute(new HttpCallback() {
|
.execute(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求接口获取是否展示
|
* 请求接口获取是否展示
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user