mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -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);
|
ProfileAdapter profileAdapter = new ProfileAdapter(this, true);
|
||||||
ProfileEditor profileEditor = new ProfileEditor(this,(name, isNew, deleting)->{
|
ProfileEditor profileEditor = new ProfileEditor(this,(name, isNew, deleting)->{
|
||||||
LauncherProfiles.update();
|
LauncherProfiles.update();
|
||||||
|
profileAdapter.notifyDataSetChanged();
|
||||||
if(isNew) {
|
if(isNew) {
|
||||||
mVersionSelector.setSelection(profileAdapter.resolveProfileIndex(name));
|
mVersionSelector.setSelection(profileAdapter.resolveProfileIndex(name));
|
||||||
}
|
}
|
||||||
if(deleting) {
|
if(deleting) {
|
||||||
mVersionSelector.setSelection(0);
|
mVersionSelector.setSelection(0);
|
||||||
}
|
}
|
||||||
profileAdapter.notifyDataSetChanged();
|
|
||||||
});
|
});
|
||||||
mVersionSelector.setOnLongClickListener((v)->profileEditor.show(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,"")));
|
mVersionSelector.setOnLongClickListener((v)->profileEditor.show(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,"")));
|
||||||
mVersionSelector.setAdapter(profileAdapter);
|
mVersionSelector.setAdapter(profileAdapter);
|
||||||
|
@ -4,7 +4,7 @@ import net.kdt.pojavlaunch.*;
|
|||||||
|
|
||||||
public class MinecraftLauncherProfiles
|
public class MinecraftLauncherProfiles
|
||||||
{
|
{
|
||||||
public Map<String, MinecraftProfile> profiles;
|
public Map<String, MinecraftProfile> profiles = new HashMap<>();
|
||||||
public boolean profilesWereMigrated;
|
public boolean profilesWereMigrated;
|
||||||
public String clientToken;
|
public String clientToken;
|
||||||
public Map<String, MinecraftAuthenticationDatabase> authenticationDatabase;
|
public Map<String, MinecraftAuthenticationDatabase> authenticationDatabase;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user