From adcf005e624165b1bbbcecfc6675dbc12bce38f0 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 14 Dec 2022 14:18:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DMainActivity=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96initTXIM=E6=97=B6=EF=BC=8C=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=A4=B1=E6=95=88=E5=AF=BC=E8=87=B4getUid?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/src/main/java/com/yunbao/main/activity/MainActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 4edc5b9c1..b69a1bab3 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -542,6 +542,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //登录腾讯云服务器 CommonAppConfig.getInstance(); IMLoginModel userInfo = IMLoginManager.get(this).getUserInfo(); + if (userInfo == null) { + RouteUtil.forwardLoginInvalid("登錄信息已失效,請重新登錄"); + return; + } // 1. 从 IM 控制台获取应用 SDKAppID,详情请参考 SDKAppID。 // 2. 初始化 config 对象 V2TIMSDKConfig config = new V2TIMSDKConfig();