mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 15:48:26 -04:00
[V2 UI] Try to fix start activity loop
This commit is contained in:
parent
fd0816b524
commit
c5ad91257b
@ -135,16 +135,19 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
}
|
||||
}
|
||||
accountSelector.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
|
||||
|
||||
private boolean isCalled;
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> p1, View p2, int position, long p4) {
|
||||
if (tempProfile != null && position == 0) {
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, tempProfile);
|
||||
} else {
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, accountList.get(position + (tempProfile != null ? 1 : 0)));
|
||||
if (!isCalled) {
|
||||
isCalled = true;
|
||||
if (tempProfile != null && position == 0) {
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, tempProfile);
|
||||
} else {
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, accountList.get(position + (tempProfile != null ? 1 : 0)));
|
||||
}
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
}
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user