TF-1869: Double check email have been duplicated and remove it
(cherry picked from commit d1d448502228633554ea6eeb9a4bb9c98f849b18)
This commit is contained in:
@@ -17,7 +17,7 @@ extension DetailedEmailExtension on DetailedEmail {
|
||||
);
|
||||
}
|
||||
|
||||
String get newEmailFolderPath => CachingConstants.newEmailContentFolderName;
|
||||
String get newEmailFolderPath => CachingConstants.incomingEmailedContentFolderName;
|
||||
|
||||
String get openedEmailFolderPath => CachingConstants.openedEmailContentFolderName;
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ abstract class EmailRepository {
|
||||
|
||||
Future<void> storeEmailToCache(Session session, AccountId accountId, Email email);
|
||||
|
||||
Future<Email?> getEmailFromCache(Session session, AccountId accountId, EmailId emailId);
|
||||
Future<Email?> getEmailStored(Session session, AccountId accountId, EmailId emailId);
|
||||
|
||||
Future<void> storeOpenedEmail(Session session, AccountId accountId, DetailedEmail detailedEmail);
|
||||
|
||||
|
||||
@@ -92,10 +92,10 @@ class GetEmailContentInteractor {
|
||||
bool draftsEmail = false
|
||||
}
|
||||
) async* {
|
||||
log('GetEmailContentInteractor::_getOpenedEmailCache():');
|
||||
try {
|
||||
final detailedEmail = await emailRepository.getOpenedEmail(session, accountId, emailId);
|
||||
if (detailedEmail != null) {
|
||||
log('GetEmailContentInteractor::_tryToGetOpenedEmailCache(): $detailedEmail');
|
||||
yield Right<Failure, Success>(GetEmailContentFromCacheSuccess(
|
||||
detailedEmail.htmlEmailContent ?? "",
|
||||
detailedEmail.attachments ?? [],
|
||||
|
||||
Reference in New Issue
Block a user