From ae9421437c2a4438ab6e6cebcca3a79ff2af189e Mon Sep 17 00:00:00 2001 From: dab246 Date: Thu, 2 May 2024 02:07:33 +0700 Subject: [PATCH] TF-2646 Remove `DeleteAllPermanently` & `AllUnSpam` action for selection all email in search --- .../widgets/app_bar/top_bar_thread_selection.dart | 1 + lib/features/thread/presentation/thread_controller.dart | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/features/mailbox_dashboard/presentation/widgets/app_bar/top_bar_thread_selection.dart b/lib/features/mailbox_dashboard/presentation/widgets/app_bar/top_bar_thread_selection.dart index 229f863ce7..491dd10e0d 100644 --- a/lib/features/mailbox_dashboard/presentation/widgets/app_bar/top_bar_thread_selection.dart +++ b/lib/features/mailbox_dashboard/presentation/widgets/app_bar/top_bar_thread_selection.dart @@ -139,6 +139,7 @@ class TopBarThreadSelection extends StatelessWidget{ bool get canDeletePermanently => listEmail.isAllCanDeletePermanently(mapMailbox); bool get canDeleteAllPermanently => isSelectAllEmailsEnabled + && selectedMailbox != null && (selectedMailbox?.isTrash == true || selectedMailbox?.isSpam == true || selectedMailbox?.isDrafts == true); diff --git a/lib/features/thread/presentation/thread_controller.dart b/lib/features/thread/presentation/thread_controller.dart index cd4feabd7b..940f05ce56 100644 --- a/lib/features/thread/presentation/thread_controller.dart +++ b/lib/features/thread/presentation/thread_controller.dart @@ -1638,8 +1638,6 @@ class ThreadController extends BaseController with EmailActionController, PopupM _searchEmailFilter.toSearchEmailFilterRequest(moreFilterCondition: _getFilterCondition()), ); break; - case EmailActionType.deleteAllPermanently: - break; case EmailActionType.markAllAsStarred: mailboxDashBoardController.markAllSearchAsStarred( _session!, @@ -1655,8 +1653,6 @@ class ThreadController extends BaseController with EmailActionController, PopupM _searchEmailFilter.toSearchEmailFilterRequest(moreFilterCondition: _getFilterCondition()), ); break; - case EmailActionType.allUnSpam: - break; default: break; }