mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
in the account switcher, do nothing if switching no new account was selected
prevent switching accounts if the currently selected account was tapped, just close the dialog in this case. (ux wise, it is better to show the current account - to get some overview and also to easily see what the current account is)
This commit is contained in:
@@ -239,9 +239,14 @@ public class AccountManager {
|
||||
activity.finishAffinity();
|
||||
activity.startActivity(new Intent(activity, WelcomeActivity.class));
|
||||
} else { // switch account
|
||||
switchAccount(activity, accounts.get(which));
|
||||
activity.finishAffinity();
|
||||
activity.startActivity(new Intent(activity.getApplicationContext(), ConversationListActivity.class));
|
||||
Account account = accounts.get(which);
|
||||
if (account.isCurrent()) {
|
||||
dialog.dismiss();
|
||||
} else {
|
||||
switchAccount(activity, account);
|
||||
activity.finishAffinity();
|
||||
activity.startActivity(new Intent(activity.getApplicationContext(), ConversationListActivity.class));
|
||||
}
|
||||
}
|
||||
});
|
||||
if (accounts.size() > 1) {
|
||||
|
||||
Reference in New Issue
Block a user