TF-421 Support delete permanently in mailbox Draft on Mobile
This commit is contained in:
@@ -93,12 +93,13 @@ class BottomBarThreadSelectionWidget {
|
|||||||
})
|
})
|
||||||
..text(_textButtonSpam, isVertical: _responsiveUtils.isMobile(_context)))
|
..text(_textButtonSpam, isVertical: _responsiveUtils.isMobile(_context)))
|
||||||
.build()),
|
.build()),
|
||||||
Expanded(child: (ButtonBuilder(_imagePaths.icDelete)
|
Expanded(child: (ButtonBuilder(canDeletePermanently ? _imagePaths.icDeleteComposer : _imagePaths.icDelete)
|
||||||
..key(const Key('button_delete_email'))
|
..key(const Key('button_delete_email'))
|
||||||
|
..iconColor(canDeletePermanently ? AppColor.colorDeletePermanentlyButton : AppColor.primaryColor)
|
||||||
..paddingIcon(const EdgeInsets.symmetric(horizontal: 8, vertical: 4))
|
..paddingIcon(const EdgeInsets.symmetric(horizontal: 8, vertical: 4))
|
||||||
..textStyle(const TextStyle(fontSize: 12, color: AppColor.colorTextButton))
|
..textStyle(const TextStyle(fontSize: 12, color: AppColor.colorTextButton))
|
||||||
..onPressActionClick(() {
|
..onPressActionClick(() {
|
||||||
if (_currentMailbox?.isTrash == true) {
|
if (canDeletePermanently) {
|
||||||
_onPressEmailSelectionActionClick?.call(EmailActionType.deletePermanently, _listSelectionEmail);
|
_onPressEmailSelectionActionClick?.call(EmailActionType.deletePermanently, _listSelectionEmail);
|
||||||
} else {
|
} else {
|
||||||
_onPressEmailSelectionActionClick?.call(EmailActionType.moveToTrash, _listSelectionEmail);
|
_onPressEmailSelectionActionClick?.call(EmailActionType.moveToTrash, _listSelectionEmail);
|
||||||
@@ -110,6 +111,10 @@ class BottomBarThreadSelectionWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get canDeletePermanently {
|
||||||
|
return _currentMailbox?.isTrash == true || _currentMailbox?.isDrafts == true;
|
||||||
|
}
|
||||||
|
|
||||||
String? get _textButtonMarkAsRead {
|
String? get _textButtonMarkAsRead {
|
||||||
if (!_isMailboxDashboardSplitView(_context)) {
|
if (!_isMailboxDashboardSplitView(_context)) {
|
||||||
return _listSelectionEmail.isAllEmailRead
|
return _listSelectionEmail.isAllEmailRead
|
||||||
|
|||||||
Reference in New Issue
Block a user