修复获取系统未读消息时userInfo为空导致的获取不到uid导致的闪退问题

This commit is contained in:
zlzw 2023-01-29 10:43:36 +08:00
parent bc0e698a77
commit e108494bd5

View File

@ -98,6 +98,9 @@ public class MessageIMManager {
public void getSystemMessages() { public void getSystemMessages() {
systemNumber = 0; systemNumber = 0;
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
if (userInfo == null) {
return;
}
HttpClient.getInstance().get("Message.getLists", "getImUserInfo") HttpClient.getInstance().get("Message.getLists", "getImUserInfo")
.params("uid", userInfo.getId()) .params("uid", userInfo.getId())
.params("token", userInfo.getToken()) .params("token", userInfo.getToken())