退出登录时增加过程弹窗, 防止过早或过慢清除token造成的页面错误

This commit is contained in:
kehaoyuan
2017-09-18 18:35:32 +08:00
parent 8533d06943
commit e5127c9040
6 changed files with 37 additions and 17 deletions

View File

@ -267,9 +267,15 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
"确定退出", "取消", new DialogUtils.ConfirmListener() {
@Override
public void onConfirm() {
LoginUtils.logout(SettingActivity.this);
EventBus.getDefault().post(new EBReuse(PersonalFragment.LOGOUT_TAG));
finish();
loadingDialog = DialogUtils.showWaitDialog(SettingActivity.this, "退出登录中...");
LoginUtils.logout(SettingActivity.this, new LoginUtils.OnLogoutListener() {
@Override
public void onCompleted() {
if (loadingDialog != null) loadingDialog.dismiss();
EventBus.getDefault().post(new EBReuse(PersonalFragment.LOGOUT_TAG));
finish();
}
});
}
}, null);
break;