diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index dae7de39c..0709595e3 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -121,7 +121,8 @@ public class LoginActivity extends AbsActivity { findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - finish(); + //finish(); + RouteUtil.forwardLauncher(LoginActivity.this); } }); 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 987edb8f7..3d0d61ddf 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -313,7 +313,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void onPageSelected(int position) { if(mTabButtonGroup.getCurPosition()!=position){ - System.err.println("重连IM"); + System.err.println("重连IM:"+IMLoginManager.isLogin(mContext)); + if(!IMLoginManager.isLogin(mContext)){ + //IMLoginManager.get(mContext).setupLoginUser(); + RouteUtil.forwardLoginInvalid("登錄失效"); + return; + } RongcloudIMManager.connectIM(mContext.getApplication()); position = 0; mTabButtonGroup.setCurPosition(0);