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:
@@ -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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user