TF-153 Combine moveToMailbox and moveToTrash to moveToMailbox using EmailActionType object
This commit is contained in:
@@ -6,9 +6,9 @@ enum EmailActionType {
|
||||
compose,
|
||||
markAsRead,
|
||||
markAsUnread,
|
||||
markAsStar,
|
||||
markAsUnStar,
|
||||
move,
|
||||
markAsStarred,
|
||||
unMarkAsStarred,
|
||||
moveToMailbox,
|
||||
edit,
|
||||
composeFromEmailAddress,
|
||||
moveToTrash,
|
||||
|
||||
@@ -17,11 +17,11 @@ extension FilterMessageOptionExtension on FilterMessageOption {
|
||||
case FilterMessageOption.all:
|
||||
return true;
|
||||
case FilterMessageOption.unread:
|
||||
return email.isUnReadEmail();
|
||||
return !email.hasRead;
|
||||
case FilterMessageOption.attachments:
|
||||
return email.withAttachments;
|
||||
case FilterMessageOption.starred:
|
||||
return email.isFlaggedEmail();
|
||||
return email.hasStarred;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ extension FilterMessageOptionExtension on FilterMessageOption {
|
||||
case FilterMessageOption.all:
|
||||
return true;
|
||||
case FilterMessageOption.unread:
|
||||
return email.isUnReadEmail();
|
||||
return !email.hasRead;
|
||||
case FilterMessageOption.attachments:
|
||||
return email.withAttachments;
|
||||
case FilterMessageOption.starred:
|
||||
return email.isFlaggedEmail();
|
||||
return email.hasStarred;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
enum MoveAction {
|
||||
moveTo,
|
||||
moveToTrash,
|
||||
undo
|
||||
}
|
||||
@@ -80,11 +80,9 @@ class PresentationEmail with EquatableMixin {
|
||||
|
||||
String getPartialContent() => preview ?? '';
|
||||
|
||||
bool isUnReadEmail() => !(keywords?.containsKey(KeyWordIdentifier.emailSeen) == true);
|
||||
bool get hasRead => keywords?.containsKey(KeyWordIdentifier.emailSeen) == true;
|
||||
|
||||
bool isReadEmail() => keywords?.containsKey(KeyWordIdentifier.emailSeen) == true;
|
||||
|
||||
bool isFlaggedEmail() => keywords?.containsKey(KeyWordIdentifier.emailFlagged) == true;
|
||||
bool get hasStarred => keywords?.containsKey(KeyWordIdentifier.emailFlagged) == true;
|
||||
|
||||
bool get withAttachments => hasAttachment == true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user