TF-1710 Add EmptySpam action to mailbox action list
(cherry picked from commit 3b7e4d5ec8c622bbe81c0a46d51c193810b96e0b)
This commit is contained in:
@@ -42,7 +42,9 @@ mixin MailboxWidgetMixin {
|
|||||||
if (mailbox.getCountUnReadEmails().isNotEmpty)
|
if (mailbox.getCountUnReadEmails().isNotEmpty)
|
||||||
MailboxActions.markAsRead,
|
MailboxActions.markAsRead,
|
||||||
if (mailbox.isTrash)
|
if (mailbox.isTrash)
|
||||||
MailboxActions.emptyTrash
|
MailboxActions.emptyTrash,
|
||||||
|
if (PlatformInfo.isWeb && mailbox.isSpam)
|
||||||
|
MailboxActions.emptySpam,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ enum MailboxActions {
|
|||||||
enableSpamReport,
|
enableSpamReport,
|
||||||
disableMailbox,
|
disableMailbox,
|
||||||
enableMailbox,
|
enableMailbox,
|
||||||
emptyTrash;
|
emptyTrash,
|
||||||
|
emptySpam;
|
||||||
}
|
}
|
||||||
|
|
||||||
extension MailboxActionsExtension on MailboxActions {
|
extension MailboxActionsExtension on MailboxActions {
|
||||||
@@ -61,6 +62,8 @@ extension MailboxActionsExtension on MailboxActions {
|
|||||||
return AppLocalizations.of(context).showMailbox;
|
return AppLocalizations.of(context).showMailbox;
|
||||||
case MailboxActions.emptyTrash:
|
case MailboxActions.emptyTrash:
|
||||||
return AppLocalizations.of(context).emptyTrash;
|
return AppLocalizations.of(context).emptyTrash;
|
||||||
|
case MailboxActions.emptySpam:
|
||||||
|
return AppLocalizations.of(context).deleteAllSpamEmails;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -88,6 +91,8 @@ extension MailboxActionsExtension on MailboxActions {
|
|||||||
return imagePaths.icShowMailbox;
|
return imagePaths.icShowMailbox;
|
||||||
case MailboxActions.emptyTrash:
|
case MailboxActions.emptyTrash:
|
||||||
return imagePaths.icMailboxTrash;
|
return imagePaths.icMailboxTrash;
|
||||||
|
case MailboxActions.emptySpam:
|
||||||
|
return imagePaths.icMailboxTrash;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -158,6 +163,7 @@ extension MailboxActionsExtension on MailboxActions {
|
|||||||
case MailboxActions.rename:
|
case MailboxActions.rename:
|
||||||
case MailboxActions.delete:
|
case MailboxActions.delete:
|
||||||
case MailboxActions.emptyTrash:
|
case MailboxActions.emptyTrash:
|
||||||
|
case MailboxActions.emptySpam:
|
||||||
return ContextMenuItemState.activated;
|
return ContextMenuItemState.activated;
|
||||||
case MailboxActions.markAsRead:
|
case MailboxActions.markAsRead:
|
||||||
return mailbox.getCountUnReadEmails().isNotEmpty
|
return mailbox.getCountUnReadEmails().isNotEmpty
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"@@last_modified": "2023-07-28T02:46:38.430701",
|
"@@last_modified": "2023-08-03T15:58:37.476969",
|
||||||
"initializing_data": "Initializing data...",
|
"initializing_data": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -3107,5 +3107,23 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"deleteAllSpamEmails": "Delete all spam emails",
|
||||||
|
"@deleteAllSpamEmails": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [],
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"emptySpamFolder": "Empty Spam folder",
|
||||||
|
"@emptySpamFolder": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [],
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"emptySpamMessageDialog": "You are about to permanently delete all items in Spam . Do you want to continue?",
|
||||||
|
"@emptySpamMessageDialog": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [],
|
||||||
|
"placeholders": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3204,4 +3204,22 @@ class AppLocalizations {
|
|||||||
'Link',
|
'Link',
|
||||||
name: 'link');
|
name: 'link');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get deleteAllSpamEmails {
|
||||||
|
return Intl.message(
|
||||||
|
'Delete all spam emails',
|
||||||
|
name: 'deleteAllSpamEmails');
|
||||||
|
}
|
||||||
|
|
||||||
|
String get emptySpamFolder {
|
||||||
|
return Intl.message(
|
||||||
|
'Empty Spam folder',
|
||||||
|
name: 'emptySpamFolder');
|
||||||
|
}
|
||||||
|
|
||||||
|
String get emptySpamMessageDialog {
|
||||||
|
return Intl.message(
|
||||||
|
'You are about to permanently delete all items in Spam . Do you want to continue?',
|
||||||
|
name: 'emptySpamMessageDialog');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user