TF-48 Create and update object for compose email

This commit is contained in:
dab246
2021-09-08 15:09:48 +07:00
committed by Dat H. Pham
parent 18d0206c44
commit db4d262a8c
20 changed files with 105 additions and 20 deletions
+2 -4
View File
@@ -5,9 +5,11 @@ import 'package:model/mailbox/select_mode.dart';
class PresentationMailbox with EquatableMixin {
static final roleInbox = Role('inbox');
static final roleTrash = Role('trash');
static final roleSent = Role('sent');
static final roleTemplates = Role('templates');
static final roleOutbox = Role('outbox');
final MailboxId id;
final MailboxName? name;
@@ -44,10 +46,6 @@ class PresentationMailbox with EquatableMixin {
bool hasRole() => role != null && role!.value.isNotEmpty;
String getCountUnReadEmails() {
if (role == roleTrash || role == roleSent || role == roleTemplates) {
return '';
}
if (unreadEmails == null || unreadEmails!.value.value <= 0) {
return '';
}