From e8d9165dd4419872bc0caf9512f55c53890585e6 Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com> Date: Mon, 14 Dec 2020 13:49:13 +0700 Subject: [PATCH] Remove fix attempt before --- .../kdt/pojavlaunch/PojavLauncherActivity.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java b/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java index dc76a884a..4c1208f3a 100644 --- a/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java +++ b/app/src/main/java/net/kdt/pojavlaunch/PojavLauncherActivity.java @@ -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