TF-1810 Add GetDetailedEmailByIdInteractor to get detailed email

(cherry picked from commit 765cebec00ae26458fe7f5e17ec6026f82f1fd0f)
This commit is contained in:
dab246
2023-05-10 15:43:41 +07:00
committed by Dat Vu
parent 892fceb037
commit 41ed9a230d
11 changed files with 188 additions and 10 deletions
@@ -154,4 +154,11 @@ class EmailDataSourceImpl extends EmailDataSource {
Future<void> storeDetailedEmailToCache(Session session, AccountId accountId, DetailedEmail detailedEmail) {
throw UnimplementedError();
}
@override
Future<Email> getDetailedEmailById(Session session, AccountId accountId, EmailId emailId) {
return Future.sync(() async {
return await emailAPI.getDetailedEmailById(session, accountId, emailId);
}).catchError(_exceptionThrower.throwException);
}
}
@@ -133,4 +133,9 @@ class EmailHiveCacheDataSourceImpl extends EmailDataSource {
Future<Email> updateEmailDrafts(Session session, AccountId accountId, Email newEmail) {
throw UnimplementedError();
}
@override
Future<Email> getDetailedEmailById(Session session, AccountId accountId, EmailId emailId) {
throw UnimplementedError();
}
}