TF-3427 Remove print action in composer in mobile browser app
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -47,7 +47,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
openRichToolbarAction: controller.richTextWebController!.toggleFormattingOptions,
|
||||
isSendButtonEnabled: controller.isEnableEmailSendButton.value,
|
||||
hasRequestReadReceipt: controller.hasRequestReadReceipt.value,
|
||||
isPrintDraftEnabled: controller.isEmailChanged.value,
|
||||
isEmailChanged: controller.isEmailChanged.value,
|
||||
menuMoreOptionController: controller.menuMoreOptionController!,
|
||||
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
||||
attachFileAction: () => controller.openFilePickerByType(context, FileType.any),
|
||||
@@ -518,7 +518,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
deleteComposerAction: () => controller.handleClickDeleteComposer(context),
|
||||
saveToDraftAction: () => controller.handleClickSaveAsDraftsButton(context),
|
||||
sendMessageAction: () => controller.handleClickSendButton(context),
|
||||
isPrintDraftEnabled: controller.isEmailChanged.isTrue,
|
||||
isEmailChanged: controller.isEmailChanged.isTrue,
|
||||
toggleCodeViewAction: controller.richTextWebController!.toggleCodeView,
|
||||
menuMoreOptionController: controller.menuMoreOptionController!,
|
||||
printDraftAction: () => controller.printDraft(context),
|
||||
@@ -801,7 +801,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
deleteComposerAction: () => controller.handleClickDeleteComposer(context),
|
||||
saveToDraftAction: () => controller.handleClickSaveAsDraftsButton(context),
|
||||
sendMessageAction: () => controller.handleClickSendButton(context),
|
||||
isPrintDraftEnabled: controller.isEmailChanged.isTrue,
|
||||
isEmailChanged: controller.isEmailChanged.isTrue,
|
||||
toggleCodeViewAction: controller.richTextWebController!.toggleCodeView,
|
||||
menuMoreOptionController: controller.menuMoreOptionController!,
|
||||
printDraftAction: () => controller.printDraft(context),
|
||||
|
||||
@@ -94,9 +94,15 @@ extension ComposerPrintDraftExtension on ComposerController {
|
||||
bccPrefix: appLocalizations.bcc_email_address_prefix,
|
||||
replyToPrefix: appLocalizations.replyToEmailAddressPrefix,
|
||||
titleAttachment: appLocalizations.attachments.toLowerCase(),
|
||||
toAddress: listToEmailAddress.toSet().toEscapeHtmlStringUseCommaSeparator(),
|
||||
ccAddress: listCcEmailAddress.toSet().toEscapeHtmlStringUseCommaSeparator(),
|
||||
bccAddress: listBccEmailAddress.toSet().toEscapeHtmlStringUseCommaSeparator(),
|
||||
toAddress: listToEmailAddress.toSet().listEmailAddressToString(
|
||||
isFullEmailAddress: true,
|
||||
),
|
||||
ccAddress: listCcEmailAddress.toSet().listEmailAddressToString(
|
||||
isFullEmailAddress: true,
|
||||
),
|
||||
bccAddress: listBccEmailAddress.toSet().listEmailAddressToString(
|
||||
isFullEmailAddress: true,
|
||||
),
|
||||
sender: identitySelected.value?.toEmailAddress(),
|
||||
receiveTime: receiveTime,
|
||||
subject: subjectEmail.value ?? '',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/base/widget/highlight_svg_icon_on_hover.dart';
|
||||
@@ -12,7 +13,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
||||
|
||||
final ImagePaths imagePaths;
|
||||
final bool isCodeViewEnabled;
|
||||
final bool isPrintDraftEnabled;
|
||||
final bool isEmailChanged;
|
||||
final bool isFormattingOptionsEnabled;
|
||||
final bool hasReadReceipt;
|
||||
final CustomPopupMenuController menuMoreOptionController;
|
||||
@@ -30,7 +31,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
||||
super.key,
|
||||
required this.imagePaths,
|
||||
required this.isCodeViewEnabled,
|
||||
required this.isPrintDraftEnabled,
|
||||
required this.isEmailChanged,
|
||||
required this.isFormattingOptionsEnabled,
|
||||
required this.hasReadReceipt,
|
||||
required this.menuMoreOptionController,
|
||||
@@ -128,7 +129,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
||||
toggleRequestReadReceiptAction();
|
||||
},
|
||||
),
|
||||
if (isPrintDraftEnabled)
|
||||
if (_isPrintEnabled)
|
||||
PopupItemWidget(
|
||||
imagePaths.icPrinter,
|
||||
AppLocalizations.of(context).print,
|
||||
@@ -183,4 +184,7 @@ class BottomBarComposerWidget extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
bool get _isPrintEnabled =>
|
||||
isEmailChanged && PlatformInfo.isWeb && PlatformInfo.isCanvasKit;
|
||||
}
|
||||
+7
-3
@@ -1,5 +1,6 @@
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/base/widget/highlight_svg_icon_on_hover.dart';
|
||||
@@ -15,7 +16,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
||||
final bool isSendButtonEnabled;
|
||||
final bool isFormattingOptionsEnabled;
|
||||
final bool hasRequestReadReceipt;
|
||||
final bool isPrintDraftEnabled;
|
||||
final bool isEmailChanged;
|
||||
final CustomPopupMenuController menuMoreOptionController;
|
||||
final VoidCallback onCloseViewAction;
|
||||
final VoidCallback attachFileAction;
|
||||
@@ -35,7 +36,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
||||
required this.isFormattingOptionsEnabled,
|
||||
required this.isSendButtonEnabled,
|
||||
required this.hasRequestReadReceipt,
|
||||
required this.isPrintDraftEnabled,
|
||||
required this.isEmailChanged,
|
||||
required this.menuMoreOptionController,
|
||||
required this.openRichToolbarAction,
|
||||
required this.onCloseViewAction,
|
||||
@@ -145,7 +146,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
||||
toggleRequestReadReceiptAction();
|
||||
},
|
||||
),
|
||||
if (isPrintDraftEnabled)
|
||||
if (_isPrintEnabled)
|
||||
PopupItemWidget(
|
||||
imagePaths.icPrinter,
|
||||
AppLocalizations.of(context).print,
|
||||
@@ -187,4 +188,7 @@ class MobileResponsiveAppBarComposerWidget extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
bool get _isPrintEnabled =>
|
||||
isEmailChanged && PlatformInfo.isWeb && PlatformInfo.isCanvasKit;
|
||||
}
|
||||
@@ -4321,6 +4321,7 @@ class AppLocalizations {
|
||||
name: 'downloadAttachmentInEMLPreviewWarningMessage',
|
||||
);
|
||||
}
|
||||
|
||||
String get editAsNewEmail {
|
||||
return Intl.message(
|
||||
'Edit as new email',
|
||||
|
||||
Reference in New Issue
Block a user