退出登录时增加过程弹窗, 防止过早或过慢清除token造成的页面错误
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user