Remove fix attempt before

This commit is contained in:
Duy Tran Khanh 2020-12-14 13:49:13 +07:00 committed by GitHub
parent c5ad91257b
commit e8d9165dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,19 +135,15 @@ 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 {
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, accountList.get(position + (tempProfile != null ? 1 : 0)));
}
finish();
startActivity(getIntent());
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());
}
@Override