Fix duplicated selected AccountCache

This commit is contained in:
Dat PHAM HOANG
2024-06-21 23:23:22 +07:00
committed by Dat H. Pham
parent 4a245e06b8
commit 885a386068
3 changed files with 344 additions and 1 deletions
@@ -35,8 +35,8 @@ class AccountCacheManager {
.removeDuplicated()
.whereNot((account) => account.accountId == newAccountCache.accountId)
.toList();
await _accountCacheClient.clearAllData();
if (newAllAccounts.isNotEmpty) {
await _accountCacheClient.clearAllData();
await _accountCacheClient.updateMultipleItem(newAllAccounts.toMap());
}
}