TF-421 Support delete permanently hove email in mailbox Draft
This commit is contained in:
@@ -602,18 +602,18 @@ class EmailTileBuilder {
|
|||||||
iconPadding: const EdgeInsets.all(5),
|
iconPadding: const EdgeInsets.all(5),
|
||||||
splashRadius: 10,
|
splashRadius: 10,
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
_imagePaths.icDelete,
|
canDeletePermanently ? _imagePaths.icDeleteComposer : _imagePaths.icDelete,
|
||||||
width: 16,
|
width: canDeletePermanently ? 14 : 16,
|
||||||
height: 16,
|
height: canDeletePermanently ? 14 : 16,
|
||||||
color: AppColor.colorActionButtonHover,
|
color: AppColor.colorActionButtonHover,
|
||||||
fit: BoxFit.fill),
|
fit: BoxFit.fill),
|
||||||
tooltip: _mailboxRole != PresentationMailbox.roleTrash
|
tooltip: canDeletePermanently
|
||||||
? AppLocalizations.of(_context).move_to_trash
|
? AppLocalizations.of(_context).delete_permanently
|
||||||
: AppLocalizations.of(_context).delete_permanently,
|
: AppLocalizations.of(_context).move_to_trash,
|
||||||
onTap: () => _emailActionClick?.call(
|
onTap: () => _emailActionClick?.call(
|
||||||
_mailboxRole != PresentationMailbox.roleTrash
|
canDeletePermanently
|
||||||
? EmailActionType.moveToTrash
|
? EmailActionType.deletePermanently
|
||||||
: EmailActionType.deletePermanently,
|
: EmailActionType.moveToTrash,
|
||||||
_presentationEmail)),
|
_presentationEmail)),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
if (_mailboxRole != PresentationMailbox.roleDrafts)
|
if (_mailboxRole != PresentationMailbox.roleDrafts)
|
||||||
@@ -640,6 +640,11 @@ class EmailTileBuilder {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get canDeletePermanently {
|
||||||
|
return _mailboxRole == PresentationMailbox.roleTrash ||
|
||||||
|
_mailboxRole == PresentationMailbox.roleDrafts;
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildDateTimeForDesktopScreen() {
|
Widget _buildDateTimeForDesktopScreen() {
|
||||||
return Row(children: [
|
return Row(children: [
|
||||||
if (_hasMailboxLabel)
|
if (_hasMailboxLabel)
|
||||||
|
|||||||
Reference in New Issue
Block a user