TF-1869: Double check email have been duplicated and remove it
(cherry picked from commit d1d448502228633554ea6eeb9a4bb9c98f849b18)
This commit is contained in:
@@ -206,17 +206,17 @@ class EmailRepositoryImpl extends EmailRepository {
|
||||
|
||||
@override
|
||||
Future<DetailedEmail?> getOpenedEmail(Session session, AccountId accountId, EmailId emailId) async {
|
||||
final detailedEmail = await emailDataSource[DataSourceType.hiveCache]!.getDetailedEmail(session, accountId, emailId);
|
||||
final getIncomingEmailedStored = await emailDataSource[DataSourceType.hiveCache]!.getIncomingEmailedStored(session, accountId, emailId);
|
||||
final openedEmail = await emailDataSource[DataSourceType.hiveCache]!.getOpenedEmail(session, accountId, emailId);
|
||||
if (detailedEmail != null) {
|
||||
return detailedEmail;
|
||||
if (getIncomingEmailedStored != null) {
|
||||
return getIncomingEmailedStored;
|
||||
} else {
|
||||
return openedEmail;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Email?> getEmailFromCache(Session session, AccountId accountId, EmailId emailId) {
|
||||
return emailDataSource[DataSourceType.hiveCache]!.getEmailFromCache(session, accountId, emailId);
|
||||
Future<Email?> getEmailStored(Session session, AccountId accountId, EmailId emailId) {
|
||||
return emailDataSource[DataSourceType.hiveCache]!.getEmailStored(session, accountId, emailId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user