mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 23:59:21 -04:00
Fix: the new profile was not selected after creation, other
This commit is contained in:
parent
f89eb4a511
commit
34c1b0a77c
@ -195,13 +195,14 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
ProfileAdapter profileAdapter = new ProfileAdapter(this, true);
|
||||
ProfileEditor profileEditor = new ProfileEditor(this,(name, isNew, deleting)->{
|
||||
LauncherProfiles.update();
|
||||
profileAdapter.notifyDataSetChanged();
|
||||
if(isNew) {
|
||||
mVersionSelector.setSelection(profileAdapter.resolveProfileIndex(name));
|
||||
}
|
||||
if(deleting) {
|
||||
mVersionSelector.setSelection(0);
|
||||
}
|
||||
profileAdapter.notifyDataSetChanged();
|
||||
|
||||
});
|
||||
mVersionSelector.setOnLongClickListener((v)->profileEditor.show(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,"")));
|
||||
mVersionSelector.setAdapter(profileAdapter);
|
||||
|
@ -4,7 +4,7 @@ import net.kdt.pojavlaunch.*;
|
||||
|
||||
public class MinecraftLauncherProfiles
|
||||
{
|
||||
public Map<String, MinecraftProfile> profiles;
|
||||
public Map<String, MinecraftProfile> profiles = new HashMap<>();
|
||||
public boolean profilesWereMigrated;
|
||||
public String clientToken;
|
||||
public Map<String, MinecraftAuthenticationDatabase> authenticationDatabase;
|
||||
|
Loading…
x
Reference in New Issue
Block a user