mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 09:39:25 -04:00
Fix[UI]: crash upon login twice on the same account
This commit is contained in:
parent
ed1870eecc
commit
0c5a98810b
@ -84,6 +84,13 @@ public class mcAccountSpinner extends AppCompatSpinner implements AdapterView.On
|
||||
|
||||
private final DoneListener mDoneListener = account -> {
|
||||
Toast.makeText(getContext(), R.string.main_login_done, Toast.LENGTH_SHORT).show();
|
||||
|
||||
// Check if the account being added is not one that is already existing
|
||||
// Like login twice on the same mc account...
|
||||
for(String mcAccountName : mAccountList){
|
||||
if(mcAccountName.equals(account.username)) return;
|
||||
}
|
||||
|
||||
mSelectecAccount = account;
|
||||
invalidate();
|
||||
mAccountList.add(account.username);
|
||||
|
Loading…
x
Reference in New Issue
Block a user