TF-421 Support delete permanently hove email in mailbox Draft

This commit is contained in:
dab246
2022-09-08 16:17:52 +07:00
committed by Dat H. Pham
parent e1c8439fe4
commit 9afe0aab35
@@ -602,18 +602,18 @@ class EmailTileBuilder {
iconPadding: const EdgeInsets.all(5),
splashRadius: 10,
icon: SvgPicture.asset(
_imagePaths.icDelete,
width: 16,
height: 16,
canDeletePermanently ? _imagePaths.icDeleteComposer : _imagePaths.icDelete,
width: canDeletePermanently ? 14 : 16,
height: canDeletePermanently ? 14 : 16,
color: AppColor.colorActionButtonHover,
fit: BoxFit.fill),
tooltip: _mailboxRole != PresentationMailbox.roleTrash
? AppLocalizations.of(_context).move_to_trash
: AppLocalizations.of(_context).delete_permanently,
tooltip: canDeletePermanently
? AppLocalizations.of(_context).delete_permanently
: AppLocalizations.of(_context).move_to_trash,
onTap: () => _emailActionClick?.call(
_mailboxRole != PresentationMailbox.roleTrash
? EmailActionType.moveToTrash
: EmailActionType.deletePermanently,
canDeletePermanently
? EmailActionType.deletePermanently
: EmailActionType.moveToTrash,
_presentationEmail)),
const SizedBox(width: 5),
if (_mailboxRole != PresentationMailbox.roleDrafts)
@@ -640,6 +640,11 @@ class EmailTileBuilder {
]);
}
bool get canDeletePermanently {
return _mailboxRole == PresentationMailbox.roleTrash ||
_mailboxRole == PresentationMailbox.roleDrafts;
}
Widget _buildDateTimeForDesktopScreen() {
return Row(children: [
if (_hasMailboxLabel)