Update menu actions for each mailbox type
This commit is contained in:
@@ -63,6 +63,8 @@ class PresentationMailbox with EquatableMixin {
|
||||
|
||||
bool hasRole() => role != null && role!.value.isNotEmpty;
|
||||
|
||||
bool get isDefault => hasRole();
|
||||
|
||||
bool get isPersonal => namespace == null || namespace == Namespace('Personal');
|
||||
|
||||
bool get isTeamMailboxes => !isPersonal && !hasParentId();
|
||||
@@ -103,28 +105,6 @@ class PresentationMailbox with EquatableMixin {
|
||||
(namespace?.value.indexOf('[') ?? 0) + 1,
|
||||
namespace?.value.indexOf(']'));
|
||||
|
||||
bool get isSupportedDisableMailbox {
|
||||
if (!isSubscribedMailbox) {
|
||||
return false;
|
||||
}
|
||||
if (isPersonal) {
|
||||
return true;
|
||||
} else {
|
||||
return isTeamMailboxes;
|
||||
}
|
||||
}
|
||||
|
||||
bool get isSupportedEnableMailbox {
|
||||
if (isSubscribedMailbox) {
|
||||
return false;
|
||||
}
|
||||
if (isPersonal) {
|
||||
return true;
|
||||
} else {
|
||||
return isTeamMailboxes;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user