diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MCLauncherActivity.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MCLauncherActivity.java index 37bf4bbe3..285013665 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MCLauncherActivity.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MCLauncherActivity.java @@ -77,10 +77,7 @@ public class MCLauncherActivity extends BaseLauncherActivity tvUsernameView.setText(getString(R.string.main_welcome, mProfile.username)); } catch(Exception e) { - //Tools.throwError(this, e); - e.printStackTrace(); - Toast.makeText(this, getStr(R.string.toast_login_error, e.getMessage()), Toast.LENGTH_LONG).show(); - finish(); + Tools.showError(this, e); } //showProfileInfo(); diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavProfile.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavProfile.java index 126ee1fe2..edd9e0350 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavProfile.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavProfile.java @@ -36,7 +36,7 @@ public class PojavProfile String name = getPrefs(ctx).getString(PROFILE_PREF_FILE, ""); // A dirty fix if (!name.isEmpty() && name.startsWith(Tools.DIR_ACCOUNT_NEW) && name.endsWith(".json")) { - name = name.substring(0, name.length() - 5).replace(Tools.DIR_ACCOUNT_NEW, ""); + name = name.substring(0, name.length() - 5).replace(Tools.DIR_ACCOUNT_NEW, "").replace(".json", ""); setCurrentProfile(ctx, name); } return name;