Store mailbox cache by AccountId

(cherry picked from commit 7804f19d27d65af855e145de1953df9a553f3ce0)
This commit is contained in:
dab246
2023-04-25 14:35:55 +07:00
committed by Dat Vu
parent 880c41b721
commit 1b7ce6b37a
13 changed files with 95 additions and 28 deletions
@@ -40,9 +40,9 @@ class MailboxCacheDataSourceImpl extends MailboxDataSource {
}
@override
Future<void> update({List<Mailbox>? updated, List<Mailbox>? created, List<MailboxId>? destroyed}) {
Future<void> update(AccountId accountId, {List<Mailbox>? updated, List<Mailbox>? created, List<MailboxId>? destroyed}) {
return Future.sync(() async {
return await _mailboxCacheManager.update(updated: updated, created: created, destroyed: destroyed);
return await _mailboxCacheManager.update(accountId, updated: updated, created: created, destroyed: destroyed);
}).catchError(_exceptionThrower.throwException);
}
@@ -46,7 +46,7 @@ class MailboxDataSourceImpl extends MailboxDataSource {
}
@override
Future<void> update({List<Mailbox>? updated, List<Mailbox>? created, List<MailboxId>? destroyed}) {
Future<void> update(AccountId accountId, {List<Mailbox>? updated, List<Mailbox>? created, List<MailboxId>? destroyed}) {
throw UnimplementedError();
}