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