Hotfix conflict role Spam/Junk

This commit is contained in:
dab246
2024-08-14 17:04:43 +07:00
committed by Dat H. Pham
parent b5e3881ad4
commit 4d045bbf1a
33 changed files with 519 additions and 172 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ extension MailboxExtension on Mailbox {
bool hasRole() => role != null && role!.value.isNotEmpty;
bool get isSpam => role == PresentationMailbox.roleSpam;
bool get isSpam => role == PresentationMailbox.roleSpam || role == PresentationMailbox.roleJunk;
bool get isTrash => role == PresentationMailbox.roleTrash;
@@ -31,7 +31,7 @@ extension PresentationMailboxExtension on PresentationMailbox {
bool get isInbox => role == PresentationMailbox.roleInbox;
bool get isSpam => role == PresentationMailbox.roleSpam;
bool get isSpam => role == PresentationMailbox.roleSpam || role == PresentationMailbox.roleJunk;
bool get isTrash => role == PresentationMailbox.roleTrash;
+3 -1
View File
@@ -14,7 +14,8 @@ class PresentationMailbox with EquatableMixin {
static const String templatesRole= 'templates';
static const String outboxRole = 'outbox';
static const String draftsRole = 'drafts';
static const String spamRole = 'junk';
static const String junkRole = 'junk';
static const String spamRole = 'spam';
static const String archiveRole = 'archive';
static const String recoveredRole = 'restored messages';
@@ -27,6 +28,7 @@ class PresentationMailbox with EquatableMixin {
static final roleOutbox = Role(outboxRole);
static final roleDrafts = Role(draftsRole);
static final roleSpam = Role(spamRole);
static final roleJunk = Role(junkRole);
static final roleArchive = Role(archiveRole);
static final roleRecovered = Role(recoveredRole);