fix(multi-account): persist loaded account to encrypted storage on startup
loadSavedAccount() reads from legacy files (last_account.txt) but never wrote to the encrypted multi-account storage, so the account switcher dropdown was always empty after restart. Now calls ensureCurrentAccountInStorage() + refreshAccountList() after successful load so the current account appears in the dropdown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -672,6 +672,10 @@ fun App(
|
||||
}
|
||||
val result = accountManager.loadSavedAccount()
|
||||
if (result.isSuccess) {
|
||||
// Ensure loaded account is in multi-account storage
|
||||
accountManager.ensureCurrentAccountInStorage()
|
||||
accountManager.refreshAccountList()
|
||||
|
||||
val current = accountManager.currentAccount()
|
||||
if (current?.signerType is com.vitorpamplona.amethyst.commons.model.account.SignerType.Remote) {
|
||||
accountManager.startHeartbeat(scope)
|
||||
|
||||
Reference in New Issue
Block a user