opt history account

Closes #948

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-06 21:22:59 +08:00
parent eb9f3cd21c
commit f663301eae
8 changed files with 77 additions and 32 deletions

View File

@@ -16,6 +16,13 @@ class Accounts {
static final Map<AccountType, Account> accountMode = {};
static Account get main => accountMode[AccountType.main]!;
static Account get heartbeat => accountMode[AccountType.heartbeat]!;
static Account get history {
final heartbeat = Accounts.heartbeat;
if (heartbeat is AnonymousAccount) {
return Accounts.main;
}
return heartbeat;
}
// static set main(Account account) => set(AccountType.main, account);
static Future<void> init() async {