TF-1710 Update new UI for banner empty trash

(cherry picked from commit e467d973c338f8323c7109cb491c33c6e3c17c09)
This commit is contained in:
dab246
2023-08-03 18:54:20 +07:00
committed by Dat Vu
parent 7f35974b3b
commit 47199fee11
5 changed files with 147 additions and 140 deletions
@@ -1468,10 +1468,20 @@ class MailboxDashBoardController extends ReloadableController {
}
}
bool get isMailboxTrashValid {
return selectedMailbox.value != null
&& selectedMailbox.value!.isTrash
&& selectedMailbox.value!.countEmails > 0;
bool isEmptyTrashBannerEnabledOnWeb(BuildContext context) {
return selectedMailbox.value != null &&
selectedMailbox.value!.isTrash &&
selectedMailbox.value!.countEmails > 0 &&
!searchController.isSearchActive() &&
_responsiveUtils.isWebDesktop(context);
}
bool isEmptyTrashBannerEnabledOnMobile(BuildContext context) {
return selectedMailbox.value != null &&
selectedMailbox.value!.isTrash &&
selectedMailbox.value!.countEmails > 0 &&
!searchController.isSearchActive() &&
!_responsiveUtils.isWebDesktop(context);
}
void emptyTrashAction(BuildContext context) {