public void logout(final Context context, String uid) { tokenListModel.deleteToken(context, uid); userModel.deleteUserByUid( Long.valueOf(uid), context, new UserModel.OnUserDeleteListener() { @Override public void onSuccess(ArrayList<User> userlist) { accoutActivityView.updateListView(userlist); } @Override public void onEmpty() { Intent intent = new Intent(context, UnLoginActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); accoutActivityView.finishItself(); } @Override public void onError(String error) { ToastUtil.showShort(context, error); } }); }
@Override public void switchAccout(Context context, String uid) { tokenListModel.switchToken(context, uid); }