TF-4195 Add Label as to email context menu
This commit is contained in:
@@ -175,6 +175,8 @@ extension EmailActionTypeExtension on EmailActionType {
|
||||
case EmailActionType.moveToTrash:
|
||||
case EmailActionType.deletePermanently:
|
||||
return imagePaths.icDeleteComposer;
|
||||
case EmailActionType.labelAs:
|
||||
return imagePaths.icTag;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
@@ -222,6 +224,8 @@ extension EmailActionTypeExtension on EmailActionType {
|
||||
return appLocalizations.move_to_trash;
|
||||
case EmailActionType.deletePermanently:
|
||||
return appLocalizations.delete_permanently;
|
||||
case EmailActionType.labelAs:
|
||||
return appLocalizations.labelAs;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -1551,4 +1551,9 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
_threadDetailController?.onNextMobile();
|
||||
}
|
||||
}
|
||||
|
||||
bool get isLabelFeatureEnabled {
|
||||
return mailboxDashBoardController.isLabelCapabilitySupported &&
|
||||
mailboxDashBoardController.labelController.isLabelSettingEnabled.isTrue;
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
handleEmailAction: controller.handleEmailAction,
|
||||
additionalActions: [],
|
||||
emailIsRead: presentationEmail.hasRead,
|
||||
isLabelFeatureEnabled: controller.isLabelFeatureEnabled,
|
||||
openBottomSheetContextMenu: controller.mailboxDashBoardController.openBottomSheetContextMenu,
|
||||
openPopupMenu: controller.mailboxDashBoardController.openPopupMenuActionGroup,
|
||||
);
|
||||
@@ -307,6 +308,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
EmailActionType.deletePermanently,
|
||||
],
|
||||
emailIsRead: presentationEmail.hasRead,
|
||||
isLabelFeatureEnabled: controller.isLabelFeatureEnabled,
|
||||
openBottomSheetContextMenu: controller.mailboxDashBoardController.openBottomSheetContextMenu,
|
||||
openPopupMenu: controller.mailboxDashBoardController.openPopupMenuActionGroup,
|
||||
),
|
||||
|
||||
@@ -483,6 +483,7 @@ class EmailActionReactor {
|
||||
) handleEmailAction,
|
||||
required List<EmailActionType> additionalActions,
|
||||
required bool emailIsRead,
|
||||
required bool isLabelFeatureEnabled,
|
||||
required OpenBottomSheetContextMenuAction openBottomSheetContextMenu,
|
||||
required OpenPopupMenuActionGroup openPopupMenu,
|
||||
}) {
|
||||
@@ -499,6 +500,8 @@ class EmailActionReactor {
|
||||
if (EmailUtils.isReplyToListEnabled(presentationEmail.listPost ?? '') &&
|
||||
additionalActions.contains(EmailActionType.replyToList))
|
||||
EmailActionType.replyToList,
|
||||
if (isLabelFeatureEnabled)
|
||||
EmailActionType.labelAs,
|
||||
if (PlatformInfo.isWeb &&
|
||||
PlatformInfo.isCanvasKit &&
|
||||
additionalActions.contains(EmailActionType.printAll))
|
||||
|
||||
@@ -5289,5 +5289,11 @@
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"labelAs": "Label as",
|
||||
"@labelAs": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
}
|
||||
}
|
||||
@@ -5619,4 +5619,11 @@ class AppLocalizations {
|
||||
name: 'theLabelFeatureIsNowAvailable',
|
||||
);
|
||||
}
|
||||
|
||||
String get labelAs {
|
||||
return Intl.message(
|
||||
'Label as',
|
||||
name: 'labelAs',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user