[V2 UI] Try to fix start activity loop

This commit is contained in:
khanhduytran0 2020-12-14 13:00:43 +07:00
parent fd0816b524
commit c5ad91257b

View File

@ -135,9 +135,11 @@ 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 (!isCalled) {
isCalled = true;
if (tempProfile != null && position == 0) {
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, tempProfile);
} else {
@ -146,6 +148,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
finish();
startActivity(getIntent());
}
}
@Override
public void onNothingSelected(AdapterView<?> p1) {