Merge pull request #376 from yushijinhun/fix

Fix selected account is not loaded
This commit is contained in:
huanghongxun
2018-07-09 21:41:44 +08:00
committed by GitHub

View File

@@ -84,6 +84,8 @@ public class Settings {
ConfigHolder.CONFIG.authlibInjectorServers.addListener(onInvalidating(this::removeDanglingAuthlibInjectorAccounts)); ConfigHolder.CONFIG.authlibInjectorServers.addListener(onInvalidating(this::removeDanglingAuthlibInjectorAccounts));
this.selectedAccount.set(accounts.get(ConfigHolder.CONFIG.selectedAccount.get()));
checkProfileMap(); checkProfileMap();
save(); save();
@@ -300,7 +302,7 @@ public class Settings {
* ACCOUNTS * * ACCOUNTS *
****************************************/ ****************************************/
private final ImmediateObjectProperty<Account> selectedAccount = new ImmediateObjectProperty<Account>(this, "selectedAccount", accounts.get(ConfigHolder.CONFIG.selectedAccount.get())) { private final ImmediateObjectProperty<Account> selectedAccount = new ImmediateObjectProperty<Account>(this, "selectedAccount", null) {
@Override @Override
public Account get() { public Account get() {
Account a = super.get(); Account a = super.get();