TF-1839 Clean SendingEmail in cache

(cherry picked from commit 2bf35cb26095d7cebb9e722722c209878162805f)
This commit is contained in:
dab246
2023-06-05 11:42:24 +07:00
committed by Dat Vu
parent f121e0c719
commit c70a388732
4 changed files with 41 additions and 7 deletions
@@ -256,7 +256,7 @@ class EmailHiveCacheDataSourceImpl extends EmailDataSource {
@override
Future<List<SendingEmail>> getAllSendingEmails(AccountId accountId, UserName userName, {bool needToReopen = false}) {
return Future.sync(() async {
final sendingEmailsCache = await _sendingEmailCacheManager.getAllSendingEmails(accountId, userName, needToReopen: needToReopen);
final sendingEmailsCache = await _sendingEmailCacheManager.getAllSendingEmailsByTupleKey(accountId, userName, needToReopen: needToReopen);
return sendingEmailsCache.toSendingEmails();
}).catchError(_exceptionThrower.throwException);
}