部分接口改为获取完整用户信息后才请求

This commit is contained in:
huangjian
2021-07-21 17:27:44 +08:00
parent 32a7b0e667
commit ce4a1f6c0c
2 changed files with 12 additions and 11 deletions

View File

@@ -633,15 +633,6 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
mMainTabLayout.setmUnReadDynamicCount(0);
int unreadCount = IMMessageManager.get().queryUnreadMsg();
mMainTabLayout.setMsgNum(unreadCount);
// 互动消息未读数量
HomeModel.get().getUnreadCount(AuthModel.get().getCurrentUid())
.compose(bindToLifecycle())
.subscribe((integer, throwable) -> {
if (integer != null) {
EventBus.getDefault().post(new UnReadCountEvent(integer));
}
});
openCommunityNotice();
}
@@ -856,6 +847,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
* 第一次加载到用户信息
* 跳转优先级 闪屏→linkedMe→渠道指定房间→邀请码
*/
@SuppressLint("CheckResult")
private void firstLoadedUserInfo() {
//青少年弹窗处理
PmDialogShowMrg.get().handle(new WeakReference<>(this));
@@ -865,6 +857,15 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
handleChannelPageInfo();
// 互动消息未读数量
HomeModel.get().getUnreadCount(AuthModel.get().getCurrentUid())
.compose(bindToLifecycle())
.subscribe((integer, throwable) -> {
if (integer != null) {
EventBus.getDefault().post(new UnReadCountEvent(integer));
}
});
}
//闪屏→linkedme→渠道指定房间→邀请码

View File

@@ -3,10 +3,10 @@ package com.yizhuan.xchat_android_core.radish;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
import com.yizhuan.xchat_android_core.base.BaseModel;
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
import com.yizhuan.xchat_android_core.radish.event.RadishWalletInfoUpdateEvent;
import com.yizhuan.xchat_android_core.user.event.LoadLoginUserInfoEvent;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
@@ -87,7 +87,7 @@ public class RadishModel extends BaseModel implements IRadishModel {
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onLoginEvent(LoginEvent event) {
public void onLoadLoginUserInfoEvent(LoadLoginUserInfoEvent event) {
updateRadishWallet().subscribe();
}