TF-1793 Add spam mailbox to canDeletePermanently condition

(cherry picked from commit 242122dcb187c1032208de4a756b250bb5335087)
This commit is contained in:
hieubt
2023-10-24 08:36:22 +07:00
committed by Dat H. Pham
parent 6f471deec5
commit 73a8919f18
5 changed files with 18 additions and 13 deletions
@@ -152,5 +152,5 @@ class SelectionWebAppBarThreadWidget extends StatelessWidget {
);
}
bool get _deletePermanentlyValid => mailboxSelected?.isTrash == true || mailboxSelected?.isDrafts == true;
bool get _deletePermanentlyValid => mailboxSelected?.isTrash == true || mailboxSelected?.isDrafts == true || mailboxSelected?.isSpam == true;
}
@@ -164,7 +164,7 @@ class BottomBarThreadSelectionWidget extends StatelessWidget{
}
bool get canDeletePermanently {
return _currentMailbox?.isTrash == true || _currentMailbox?.isDrafts == true;
return _currentMailbox?.isTrash == true || _currentMailbox?.isDrafts == true || _currentMailbox?.isSpam == true;
}
bool _verticalDirection(BuildContext context) {
@@ -477,7 +477,7 @@ class EmailTileBuilder with BaseEmailItemTile {
}
bool get canDeletePermanently {
return mailboxContain?.isTrash == true || mailboxContain?.isDrafts == true;
return mailboxContain?.isTrash == true || mailboxContain?.isDrafts == true || mailboxContain?.isSpam == true;
}
Widget _buildDateTimeForDesktopScreen() {