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:
nrobi144
2026-04-28 14:19:04 +03:00
parent 573b478bbc
commit 0fb7c659f2
@@ -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)