TF-4358 Remove mail in trash by default in search result (#4361)

This commit is contained in:
Dat Vu
2026-04-10 15:15:53 +07:00
committed by GitHub
parent bc707b2612
commit c9e2e5db80
17 changed files with 290 additions and 131 deletions
@@ -172,4 +172,20 @@ extension PresentationMailboxExtension on PresentationMailbox {
isLabelMailbox ? (this as PresentationLabelMailbox).label.id : null;
MailboxId? get browserRouteMailboxId => isLabelMailbox ? null : mailboxId;
bool get isAllEmailTrashAndSpamFolder => id == PresentationMailbox.allEmailTrashAndSpamFolder.id;
bool get isAllEmail => id == PresentationMailbox.unifiedMailbox.id;
bool get isUnifiedMailbox => isAllEmail || isAllEmailTrashAndSpamFolder;
String getFolderNameForQuickSearch(AppLocalizations appLocalizations) {
if (isAllEmailTrashAndSpamFolder) {
return appLocalizations.allEmailTrashAndSpam;
} else if (isAllEmail) {
return appLocalizations.allEmail;
} else {
return getDisplayNameWithoutContext(appLocalizations);
}
}
}