Get spam mailbox cache by AccountId

(cherry picked from commit c35685bf34f5f4fbf28c4cbca9842c20dee61ffc)
This commit is contained in:
dab246
2023-04-25 15:23:52 +07:00
committed by Dat Vu
parent 6189edd777
commit 8414c0d819
11 changed files with 20 additions and 19 deletions
@@ -70,7 +70,7 @@ class SharePreferenceSpamReportDataSourceImpl extends SpamReportDataSource {
}
@override
Future<Mailbox> getSpamMailboxCached() {
Future<Mailbox> getSpamMailboxCached(AccountId accountId) {
throw UnimplementedError();
}
}
@@ -37,9 +37,9 @@ class SpamReportCacheDataSourceImpl extends SpamReportDataSource {
}
@override
Future<Mailbox> getSpamMailboxCached() {
Future<Mailbox> getSpamMailboxCached(AccountId accountId) {
return Future.sync(() async {
return await _mailboxCacheManager.getSpamMailbox();
return await _mailboxCacheManager.getSpamMailbox(accountId);
}).catchError(_exceptionThrower.throwException);
}
@@ -66,7 +66,7 @@ class SpamReportDataSourceImpl extends SpamReportDataSource {
}
@override
Future<Mailbox> getSpamMailboxCached() {
Future<Mailbox> getSpamMailboxCached(AccountId accountId) {
throw UnimplementedError();
}
}