[Account loader] still fixing around account path

This commit is contained in:
Duy Tran Khanh 2020-12-25 13:13:07 +07:00
parent 65d68fad2e
commit 241d7933d7
2 changed files with 2 additions and 5 deletions

View File

@ -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();

View File

@ -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;