diff --git a/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java b/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java index 5f9c275cf..dc76a884a 100644 --- a/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java +++ b/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java @@ -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