TF-1705 Auto create default folder if missing on server CYRUS

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit 1a5bad168cddf07662f4c682189840bc8c4bdcef)
This commit is contained in:
dab246
2023-10-31 01:30:11 +07:00
committed by Dat Vu
parent 5e69c8bd1c
commit c279730309
18 changed files with 375 additions and 36 deletions
@@ -0,0 +1,24 @@
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
import 'package:model/mailbox/presentation_mailbox.dart';
extension RoleExtension on Role {
String get mailboxName {
if (this == PresentationMailbox.roleInbox) {
return 'Inbox';
} else if (this == PresentationMailbox.roleSent) {
return 'Sent';
} else if (this == PresentationMailbox.roleOutbox) {
return 'Outbox';
} else if (this == PresentationMailbox.roleDrafts) {
return 'Drafts';
} else if (this == PresentationMailbox.roleTrash) {
return 'Trash';
} else if (this == PresentationMailbox.roleSpam) {
return 'Spam';
} else {
return '';
}
}
}