TF-3189 subaddressing features only shown if supported by the server

This commit is contained in:
Florent Azavant
2024-11-29 12:30:22 +01:00
committed by Dat H. Pham
parent f1ec1d7324
commit 019dbe6e03
4 changed files with 130 additions and 18 deletions
@@ -201,10 +201,15 @@ class SearchMailboxView extends GetWidget<SearchMailboxController>
controller.dashboardController.sessionCurrent,
controller.dashboardController.accountId.value);
final bool subaddressingSupported = MailboxWidgetMixin.isSubaddressingSupported(
controller.dashboardController.sessionCurrent,
controller.dashboardController.accountId.value);
final contextMenuActions = listContextMenuItemAction(
mailbox,
controller.dashboardController.enableSpamReport,
deletedMessageVaultSupported
deletedMessageVaultSupported,
subaddressingSupported,
);
return contextMenuActions
.map((action) => _mailboxFocusedMenuItem(context, action, mailbox))
@@ -262,10 +267,15 @@ class SearchMailboxView extends GetWidget<SearchMailboxController>
controller.dashboardController.sessionCurrent,
controller.dashboardController.accountId.value);
final bool subaddressingSupported = MailboxWidgetMixin.isSubaddressingSupported(
controller.dashboardController.sessionCurrent,
controller.dashboardController.accountId.value);
final contextMenuActions = listContextMenuItemAction(
mailbox,
controller.dashboardController.enableSpamReport,
deletedMessageVaultSupported
deletedMessageVaultSupported,
subaddressingSupported,
);
if (contextMenuActions.isEmpty) {