提交 956a7aa2 authored 作者: lgd's avatar lgd

1.修改退出登录问题

上级 5c813642
...@@ -259,11 +259,12 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa ...@@ -259,11 +259,12 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void login(LoginEvent lg) { public void login(LoginEvent lg) {
if (!UserKeeper.getInstance().getMesLogin()) { if (!UserKeeper.getInstance().getMesLogin()) {
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()), 1);
Intent intent = new Intent(MainActivity.this, LoginActivity.class); Intent intent = new Intent(MainActivity.this, LoginActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
UserKeeper.getInstance().clearAll(); UserKeeper.getInstance().clearAll();
DataKeeper.getInstance().clearAll();
startActivity(intent); startActivity(intent);
WorkUtils.handleAlias(Integer.valueOf(UserKeeper.getInstance().getUserId()), 1);
} }
} }
......
...@@ -110,7 +110,7 @@ public class UserSettingActivity extends WorkToolBarActivity { ...@@ -110,7 +110,7 @@ public class UserSettingActivity extends WorkToolBarActivity {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
UserKeeper.getInstance().clearAll(); UserKeeper.getInstance().clearAll();
DataKeeper.getInstance().clearAll(); DataKeeper.getInstance().clearAll();
EventBus.getDefault().post(new LoginEvent()); // EventBus.getDefault().post(new LoginEvent());
startActivity(intent); startActivity(intent);
// RtfUtils.getRtf().logout().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { // RtfUtils.getRtf().logout().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
// //
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论