fix issue where removing account could prevent application from starting
This commit is contained in:
parent
b2342dde89
commit
475e3a4210
|
@ -98,6 +98,10 @@ class Settings {
|
|||
{identityList[i]: await AccountSettings.create(identityList[i])});
|
||||
}
|
||||
settings.activeIdentity = settings.prefs.getString(activeIdentityKey) ?? "";
|
||||
if (!settings.identities.containsKey(settings.activeIdentity) &&
|
||||
settings.identities.isNotEmpty) {
|
||||
settings.activeIdentity = settings.identities.keys.first;
|
||||
}
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue