TF-1984 Show Empty action for Trash and Spam mailbox

(cherry picked from commit da70fe0678982be8bb4c2f8daa4c3cb76fc058a0)
This commit is contained in:
dab246
2023-08-30 10:24:46 +07:00
committed by Dat Vu
parent eb997f55b7
commit 41a1efb5de
8 changed files with 46 additions and 30 deletions
@@ -47,6 +47,8 @@ extension PresentationMailboxExtension on PresentationMailbox {
bool get allowedToDisplayCountOfTotalEmails => isTrash || isSpam;
bool get allowedHasEmptyAction => (isTrash || isSpam) && countTotalEmails > 0;
String get countTotalEmailsAsString {
if (countTotalEmails <= 0) return '';
return countTotalEmails <= 999 ? '$countTotalEmails' : '999+';