TF-1810 Implement store detailed email to cache

(cherry picked from commit 6be6d69ad8e5fb05d839e2649b1f444613eea6d1)
This commit is contained in:
dab246
2023-05-10 18:00:46 +07:00
committed by Dat Vu
parent 664d1825c0
commit d357358341
20 changed files with 111 additions and 37 deletions
@@ -186,11 +186,16 @@ class EmailRepositoryImpl extends EmailRepository {
@override
Future<void> storeDetailedEmailToCache(Session session, AccountId accountId, DetailedEmail detailedEmail) {
return emailDataSource[DataSourceType.hiveCache]!.storeDetailedEmailToCache(session, accountId, detailedEmail);
return emailDataSource[DataSourceType.hiveCache]!.storeDetailedEmail(session, accountId, detailedEmail);
}
@override
Future<Email> getDetailedEmailById(Session session, AccountId accountId, EmailId emailId) {
return emailDataSource[DataSourceType.network]!.getDetailedEmailById(session, accountId, emailId);
}
@override
Future<void> storeEmailToCache(Session session, AccountId accountId, Email email) {
return emailDataSource[DataSourceType.hiveCache]!.storeEmail(session, accountId, email);
}
}