TF-657 Show notification message dialog when email has read receipt requested
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" width="64" height="64" rx="16" fill="#F3F4F5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.3098 21.1618L35.1866 18.7942C34.2474 18.0651 33.4648 17.6 32.4996 17.6C31.5344 17.6 30.7518 18.0651 29.8127 18.7942L19.73 26.4374C18.4909 27.3802 18.0996 28.1847 18.0996 29.9949V42.503C18.0996 45.1052 19.4692 46.4 22.1953 46.4H42.804C45.53 46.4 46.8996 45.0926 46.8996 42.503V29.9949C46.8996 28.1847 46.5083 27.3802 45.2692 26.4374L41.3667 23.4791L40.0158 24.83L43.8735 27.7322L36.0866 35.149L35.2387 34.3445C34.3257 33.4645 33.4387 33.1125 32.5257 33.1125C31.5996 33.1125 30.7257 33.4645 29.8127 34.3445L28.9648 35.149L21.1518 27.707L30.9344 20.353L30.9378 20.3505C31.5748 19.8744 31.9267 19.6113 32.4996 19.6113C33.0605 19.6113 33.4257 19.8753 34.0648 20.353L36.9488 22.5226L38.3098 21.1618ZM20.0953 29.6555V42.503C20.0953 42.8424 20.1474 43.1441 20.2387 43.3955L27.5953 36.4438L20.1083 29.3161C20.0953 29.4167 20.0953 29.5298 20.0953 29.6555ZM44.904 42.503V29.6555C44.904 29.5424 44.904 29.4418 44.8909 29.3538L37.4561 36.4438L44.7605 43.3704C44.8518 43.119 44.904 42.8299 44.904 42.503ZM21.8561 44.4641C21.9344 44.4766 22.0257 44.4766 22.117 44.4766H42.8822C42.9866 44.4766 43.0909 44.4766 43.1822 44.4641L34.104 35.8278C33.5431 35.2873 33.0344 35.0485 32.5257 35.0485C32.004 35.0485 31.4953 35.2873 30.9474 35.8278L21.8561 44.4641Z" fill="#007AFF"/>
|
||||
<path d="M40.047 20.6658C40.4456 20.2673 41.0918 20.2673 41.4904 20.6658C41.8585 21.034 41.8865 21.6127 41.5749 22.0135L41.5669 22.0238L41.4996 22.1L33.0434 30.7459C32.6752 31.1141 32.0965 31.1421 31.6958 30.8305L31.6854 30.8224L31.6092 30.7552L29.1985 28.3445C28.8 27.9459 28.8 27.2997 29.1985 26.9011C29.5667 26.533 30.1454 26.505 30.5462 26.8165L30.5565 26.8246L30.6327 26.8919L32.3217 28.5804L40.047 20.6658Z" fill="#007AFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.3098 21.1618L35.1866 18.7942C34.2474 18.0651 33.4648 17.6 32.4996 17.6C31.5344 17.6 30.7518 18.0651 29.8127 18.7942L19.73 26.4374C18.4909 27.3802 18.0996 28.1847 18.0996 29.9949V42.503C18.0996 45.1052 19.4692 46.4 22.1953 46.4H42.804C45.53 46.4 46.8996 45.0926 46.8996 42.503V29.9949C46.8996 28.1847 46.5083 27.3802 45.2692 26.4374L41.3667 23.4791L40.0158 24.83L43.8735 27.7322L36.0866 35.149L35.2387 34.3445C34.3257 33.4645 33.4387 33.1125 32.5257 33.1125C31.5996 33.1125 30.7257 33.4645 29.8127 34.3445L28.9648 35.149L21.1518 27.707L30.9344 20.353L30.9378 20.3505C31.5748 19.8744 31.9267 19.6113 32.4996 19.6113C33.0605 19.6113 33.4257 19.8753 34.0648 20.353L36.9488 22.5226L38.3098 21.1618ZM20.0953 29.6555V42.503C20.0953 42.8424 20.1474 43.1441 20.2387 43.3955L27.5953 36.4438L20.1083 29.3161C20.0953 29.4167 20.0953 29.5298 20.0953 29.6555ZM44.904 42.503V29.6555C44.904 29.5424 44.904 29.4418 44.8909 29.3538L37.4561 36.4438L44.7605 43.3704C44.8518 43.119 44.904 42.8299 44.904 42.503ZM21.8561 44.4641C21.9344 44.4766 22.0257 44.4766 22.117 44.4766H42.8822C42.9866 44.4766 43.0909 44.4766 43.1822 44.4641L34.104 35.8278C33.5431 35.2873 33.0344 35.0485 32.5257 35.0485C32.004 35.0485 31.4953 35.2873 30.9474 35.8278L21.8561 44.4641Z" stroke="#007AFF" stroke-width="0.36"/>
|
||||
<path d="M40.047 20.6658C40.4456 20.2673 41.0918 20.2673 41.4904 20.6658C41.8585 21.034 41.8865 21.6127 41.5749 22.0135L41.5669 22.0238L41.4996 22.1L33.0434 30.7459C32.6752 31.1141 32.0965 31.1421 31.6958 30.8305L31.6854 30.8224L31.6092 30.7552L29.1985 28.3445C28.8 27.9459 28.8 27.2997 29.1985 26.9011C29.5667 26.533 30.1454 26.505 30.5462 26.8165L30.5565 26.8246L30.6327 26.8919L32.3217 28.5804L40.047 20.6658Z" stroke="#007AFF" stroke-width="0.36"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -77,7 +77,7 @@ packages:
|
||||
name: build_runner_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.2.4"
|
||||
version: "7.2.6"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -140,7 +140,7 @@ packages:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "3.1.0"
|
||||
core:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -420,7 +420,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: "5a27adb39dd8690ebbbea13171128633fe7aeae0"
|
||||
resolved-ref: ab07a8a03d63e20f6ea5e62bcc1ca8cdc1fd93ff
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
@@ -458,7 +458,7 @@ packages:
|
||||
name: logging
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.1.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -563,7 +563,7 @@ packages:
|
||||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -603,7 +603,7 @@ packages:
|
||||
name: source_gen
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.5"
|
||||
version: "1.2.6"
|
||||
source_helper:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -652,7 +652,7 @@ packages:
|
||||
name: stream_transform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -785,7 +785,7 @@ packages:
|
||||
name: watcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "1.0.2"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -806,7 +806,7 @@ packages:
|
||||
name: webview_flutter_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.10.3"
|
||||
version: "2.10.4"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -165,6 +165,7 @@ class ImagePaths {
|
||||
String get icDownloadAttachment => _getImagePath('ic_download_attachment.svg');
|
||||
String get icAppDashboard => _getImagePath('ic_app_dashboard.svg');
|
||||
String get icRequestReadReceipt => _getImagePath('ic_request_read_receipt.svg');
|
||||
String get icReadReceiptMessage => _getImagePath('ic_read_receipt_message.svg');
|
||||
|
||||
String _getImagePath(String imageName) {
|
||||
return AssetsPaths.images + imageName;
|
||||
|
||||
@@ -27,12 +27,18 @@ class ConfirmDialogBuilder {
|
||||
EdgeInsets? _paddingContent;
|
||||
EdgeInsets? _paddingButton;
|
||||
EdgeInsets? _marginIcon;
|
||||
EdgeInsets? _margin;
|
||||
double? _widthDialog;
|
||||
bool showAsBottomSheet;
|
||||
|
||||
OnConfirmButtonAction? _onConfirmButtonAction;
|
||||
OnCancelButtonAction? _onCancelButtonAction;
|
||||
OnCloseButtonAction? _onCloseButtonAction;
|
||||
|
||||
ConfirmDialogBuilder(this._imagePath);
|
||||
ConfirmDialogBuilder(
|
||||
this._imagePath,
|
||||
{this.showAsBottomSheet = false}
|
||||
);
|
||||
|
||||
void key(Key key) {
|
||||
_key = key;
|
||||
@@ -94,6 +100,14 @@ class ConfirmDialogBuilder {
|
||||
_marginIcon = value;
|
||||
}
|
||||
|
||||
void margin(EdgeInsets? value) {
|
||||
_margin = value;
|
||||
}
|
||||
|
||||
void widthDialog(double? value) {
|
||||
_widthDialog = value;
|
||||
}
|
||||
|
||||
void onConfirmButtonAction(String confirmText, OnConfirmButtonAction? onConfirmButtonAction) {
|
||||
_confirmText = confirmText;
|
||||
_onConfirmButtonAction = onConfirmButtonAction;
|
||||
@@ -109,27 +123,38 @@ class ConfirmDialogBuilder {
|
||||
}
|
||||
|
||||
Widget build() {
|
||||
return Dialog(
|
||||
key: _key,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||
insetPadding: EdgeInsets.symmetric(horizontal: 24.0, vertical: 16.0),
|
||||
child: Container(
|
||||
margin: EdgeInsets.zero,
|
||||
padding: EdgeInsets.zero,
|
||||
width: 400,
|
||||
if (showAsBottomSheet) {
|
||||
return _bodyContent();
|
||||
} else {
|
||||
return Dialog(
|
||||
key: _key,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||
insetPadding: EdgeInsets.symmetric(
|
||||
horizontal: 24.0,
|
||||
vertical: 16.0),
|
||||
child: _bodyContent(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _bodyContent() {
|
||||
return Container(
|
||||
width: _widthDialog ?? 400,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||
margin: _margin,
|
||||
child: Wrap(children: [
|
||||
if (_onCloseButtonAction != null)
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 8, right: 8),
|
||||
child: buildIconWeb(
|
||||
icon: SvgPicture.asset(_imagePath.icCloseMailbox, fit: BoxFit.fill),
|
||||
onTap: () => _onCloseButtonAction?.call())
|
||||
)),
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 8, right: 8),
|
||||
child: buildIconWeb(
|
||||
icon: SvgPicture.asset(_imagePath.icCloseMailbox, fit: BoxFit.fill),
|
||||
onTap: () => _onCloseButtonAction?.call())
|
||||
)),
|
||||
if (_iconWidget != null)
|
||||
Container(
|
||||
margin: _marginIcon ?? EdgeInsets.only(top: 24),
|
||||
@@ -138,48 +163,47 @@ class ConfirmDialogBuilder {
|
||||
),
|
||||
if (_title.isNotEmpty)
|
||||
Padding(
|
||||
padding: _paddingTitle ?? EdgeInsets.only(top: 12),
|
||||
child: Center(
|
||||
child: Text(
|
||||
_title,
|
||||
textAlign: TextAlign.center,
|
||||
style: _styleTitle ?? TextStyle(fontSize: 20.0, color: AppColor.colorActionDeleteConfirmDialog, fontWeight: FontWeight.w500)
|
||||
padding: _paddingTitle ?? EdgeInsets.only(top: 12),
|
||||
child: Center(
|
||||
child: Text(
|
||||
_title,
|
||||
textAlign: TextAlign.center,
|
||||
style: _styleTitle ?? TextStyle(fontSize: 20.0, color: AppColor.colorActionDeleteConfirmDialog, fontWeight: FontWeight.w500)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
if (_content.isNotEmpty)
|
||||
Padding(
|
||||
padding: _paddingContent ?? EdgeInsets.symmetric(horizontal: 16, vertical: 24),
|
||||
child: Center(
|
||||
child: Text(_content,
|
||||
textAlign: TextAlign.center,
|
||||
style: _styleContent ?? TextStyle(fontSize: 17.0, color: AppColor.colorMessageDialog)
|
||||
textAlign: TextAlign.center,
|
||||
style: _styleContent ?? TextStyle(fontSize: 17.0, color: AppColor.colorMessageDialog)
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: _paddingButton ?? EdgeInsets.only(bottom: 16, left: 16, right: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
if (_cancelText.isNotEmpty)
|
||||
Expanded(child: _buildButton(
|
||||
name: _cancelText,
|
||||
bgColor: _colorCancelButton,
|
||||
radius: _radiusButton,
|
||||
textStyle: _styleTextCancelButton,
|
||||
action: _onCancelButtonAction)),
|
||||
if (_confirmText.isNotEmpty && _cancelText.isNotEmpty) SizedBox(width: 16),
|
||||
if (_confirmText.isNotEmpty)
|
||||
Expanded(child: _buildButton(
|
||||
name: _confirmText,
|
||||
bgColor: _colorConfirmButton,
|
||||
radius: _radiusButton,
|
||||
textStyle: _styleTextConfirmButton,
|
||||
action: _onConfirmButtonAction))
|
||||
]
|
||||
))
|
||||
padding: _paddingButton ?? EdgeInsets.only(bottom: 16, left: 16, right: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
if (_cancelText.isNotEmpty)
|
||||
Expanded(child: _buildButton(
|
||||
name: _cancelText,
|
||||
bgColor: _colorCancelButton,
|
||||
radius: _radiusButton,
|
||||
textStyle: _styleTextCancelButton,
|
||||
action: _onCancelButtonAction)),
|
||||
if (_confirmText.isNotEmpty && _cancelText.isNotEmpty) SizedBox(width: 16),
|
||||
if (_confirmText.isNotEmpty)
|
||||
Expanded(child: _buildButton(
|
||||
name: _confirmText,
|
||||
bgColor: _colorConfirmButton,
|
||||
radius: _radiusButton,
|
||||
textStyle: _styleTextConfirmButton,
|
||||
action: _onConfirmButtonAction))
|
||||
]
|
||||
))
|
||||
])
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -246,7 +246,7 @@ packages:
|
||||
name: http_parser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
version: "4.0.2"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -482,7 +482,7 @@ packages:
|
||||
name: webview_flutter_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.10.3"
|
||||
version: "2.10.4"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -77,7 +77,7 @@ packages:
|
||||
name: build_runner_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.2.4"
|
||||
version: "7.2.6"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -140,7 +140,7 @@ packages:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "3.1.0"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -268,7 +268,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: "5a27adb39dd8690ebbbea13171128633fe7aeae0"
|
||||
resolved-ref: ab07a8a03d63e20f6ea5e62bcc1ca8cdc1fd93ff
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
@@ -306,7 +306,7 @@ packages:
|
||||
name: logging
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.1.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -369,7 +369,7 @@ packages:
|
||||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -409,7 +409,7 @@ packages:
|
||||
name: source_gen
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.5"
|
||||
version: "1.2.6"
|
||||
source_helper:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -444,7 +444,7 @@ packages:
|
||||
name: stream_transform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -493,7 +493,7 @@ packages:
|
||||
name: watcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "1.0.2"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
+1
-1
@@ -246,4 +246,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: 91efd4097cc41f032416d67ecaac21cc2de8dd55
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
COCOAPODS: 1.11.2
|
||||
|
||||
@@ -15,18 +15,58 @@ mixin MessageDialogActionMixin {
|
||||
BuildContext context,
|
||||
String message,
|
||||
String actionName,
|
||||
Function onConfirmAction,
|
||||
{String? title, bool hasCancelButton = true, Widget? icon}
|
||||
{
|
||||
Function? onConfirmAction,
|
||||
String? title,
|
||||
String? cancelTitle,
|
||||
bool hasCancelButton = true,
|
||||
bool showAsBottomSheet = false,
|
||||
Widget? icon
|
||||
}
|
||||
) {
|
||||
if (_responsiveUtils.isMobile(context)) {
|
||||
(ConfirmationDialogActionSheetBuilder(context)
|
||||
..messageText(message)
|
||||
..styleConfirmButton(const TextStyle(fontSize: 20, fontWeight: FontWeight.normal, color: Colors.black))
|
||||
..onCancelAction(AppLocalizations.of(context).cancel, () => popBack())
|
||||
..onConfirmAction(actionName, () {
|
||||
popBack();
|
||||
onConfirmAction.call();
|
||||
})).show();
|
||||
if (showAsBottomSheet) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
barrierColor: AppColor.colorDefaultCupertinoActionSheet,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: true,
|
||||
builder: (BuildContext context) => PointerInterceptor(
|
||||
child: (ConfirmDialogBuilder(_imagePaths, showAsBottomSheet: true)
|
||||
..key(const Key('confirm_dialog_action'))
|
||||
..title(title ?? '')
|
||||
..content(message)
|
||||
..addIcon(icon)
|
||||
..margin(const EdgeInsets.symmetric(vertical: 42, horizontal: 16))
|
||||
..widthDialog(_responsiveUtils.getSizeScreenWidth(context))
|
||||
..colorConfirmButton(AppColor.colorTextButton)
|
||||
..colorCancelButton(AppColor.colorCancelButton)
|
||||
..paddingTitle(icon != null ? const EdgeInsets.only(top: 34) : EdgeInsets.zero)
|
||||
..marginIcon(EdgeInsets.zero)
|
||||
..paddingContent(const EdgeInsets.only(left: 44, right: 44, bottom: 24, top: 8))
|
||||
..paddingButton(hasCancelButton ? null : const EdgeInsets.only(bottom: 16, left: 44, right: 44))
|
||||
..styleTitle(const TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: Colors.black))
|
||||
..styleContent(const TextStyle(fontSize: 14, fontWeight: FontWeight.normal, color: AppColor.colorContentEmail))
|
||||
..styleTextCancelButton(const TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: AppColor.colorTextButton))
|
||||
..styleTextConfirmButton(const TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: Colors.white))
|
||||
..onConfirmButtonAction(actionName, () {
|
||||
popBack();
|
||||
onConfirmAction?.call();
|
||||
})
|
||||
..onCancelButtonAction(hasCancelButton ? cancelTitle ?? AppLocalizations.of(context).cancel : '', () => popBack())
|
||||
..onCloseButtonAction(() => popBack()))
|
||||
.build()));
|
||||
} else {
|
||||
(ConfirmationDialogActionSheetBuilder(context)
|
||||
..messageText(message)
|
||||
..styleConfirmButton(const TextStyle(fontSize: 20, fontWeight: FontWeight.normal, color: Colors.black))
|
||||
..onCancelAction(cancelTitle ?? AppLocalizations.of(context).cancel, () => popBack())
|
||||
..onConfirmAction(actionName, () {
|
||||
popBack();
|
||||
onConfirmAction?.call();
|
||||
})).show();
|
||||
}
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -48,9 +88,9 @@ mixin MessageDialogActionMixin {
|
||||
..styleTextConfirmButton(const TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: Colors.white))
|
||||
..onConfirmButtonAction(actionName, () {
|
||||
popBack();
|
||||
onConfirmAction.call();
|
||||
onConfirmAction?.call();
|
||||
})
|
||||
..onCancelButtonAction(hasCancelButton ? AppLocalizations.of(context).cancel : '', () => popBack())
|
||||
..onCancelButtonAction(hasCancelButton ? cancelTitle ?? AppLocalizations.of(context).cancel : '', () => popBack())
|
||||
..onCloseButtonAction(() => popBack()))
|
||||
.build()));
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ class ComposerController extends BaseController {
|
||||
showConfirmDialogAction(context,
|
||||
AppLocalizations.of(context).message_dialog_send_email_without_recipient,
|
||||
AppLocalizations.of(context).add_recipients,
|
||||
() => {},
|
||||
onConfirmAction: () => {},
|
||||
title: AppLocalizations.of(context).sending_failed,
|
||||
icon: SvgPicture.asset(_imagePaths.icSendToastError, fit: BoxFit.fill),
|
||||
hasCancelButton: false);
|
||||
@@ -652,7 +652,7 @@ class ComposerController extends BaseController {
|
||||
showConfirmDialogAction(context,
|
||||
AppLocalizations.of(context).message_dialog_send_email_with_email_address_invalid,
|
||||
AppLocalizations.of(context).fix_email_addresses,
|
||||
() {
|
||||
onConfirmAction: () {
|
||||
toAddressExpandMode.value = ExpandMode.EXPAND;
|
||||
ccAddressExpandMode.value = ExpandMode.EXPAND;
|
||||
bccAddressExpandMode.value = ExpandMode.EXPAND;
|
||||
@@ -667,7 +667,7 @@ class ComposerController extends BaseController {
|
||||
showConfirmDialogAction(context,
|
||||
AppLocalizations.of(context).message_dialog_send_email_without_a_subject,
|
||||
AppLocalizations.of(context).send_anyway,
|
||||
() => _handleSendMessages(context),
|
||||
onConfirmAction: () => _handleSendMessages(context),
|
||||
title: AppLocalizations.of(context).empty_subject,
|
||||
icon: SvgPicture.asset(_imagePaths.icEmpty, fit: BoxFit.fill),
|
||||
);
|
||||
@@ -679,7 +679,7 @@ class ComposerController extends BaseController {
|
||||
context,
|
||||
AppLocalizations.of(context).messageDialogSendEmailUploadingAttachment,
|
||||
AppLocalizations.of(context).got_it,
|
||||
() => {},
|
||||
onConfirmAction: () => {},
|
||||
title: AppLocalizations.of(context).sending_failed,
|
||||
icon: SvgPicture.asset(_imagePaths.icSendToastError, fit: BoxFit.fill),
|
||||
hasCancelButton: false);
|
||||
@@ -692,7 +692,7 @@ class ComposerController extends BaseController {
|
||||
AppLocalizations.of(context).message_dialog_send_email_exceeds_maximum_size(
|
||||
filesize(mailboxDashBoardController.maxSizeAttachmentsPerEmail?.value ?? 0, 0)),
|
||||
AppLocalizations.of(context).got_it,
|
||||
() => {},
|
||||
onConfirmAction: () => {},
|
||||
title: AppLocalizations.of(context).sending_failed,
|
||||
icon: SvgPicture.asset(_imagePaths.icSendToastError, fit: BoxFit.fill),
|
||||
hasCancelButton: false);
|
||||
@@ -707,7 +707,6 @@ class ComposerController extends BaseController {
|
||||
final accountId = mailboxDashBoardController.accountId.value;
|
||||
final sentMailboxId = mailboxDashBoardController.mapDefaultMailboxIdByRole[PresentationMailbox.roleSent];
|
||||
final outboxMailboxId = mailboxDashBoardController.outboxMailbox?.id;
|
||||
log('ComposerController::_handleSendMessages(): outboxMailboxId: $outboxMailboxId');
|
||||
final userProfile = mailboxDashBoardController.userProfile.value;
|
||||
if (arguments != null && accountId != null && userProfile != null) {
|
||||
final email = await _generateEmail(context, userProfile, outboxMailboxId: outboxMailboxId);
|
||||
@@ -842,7 +841,7 @@ class ComposerController extends BaseController {
|
||||
AppLocalizations.of(currentContext!).message_dialog_upload_attachments_exceeds_maximum_size(
|
||||
filesize(mailboxDashBoardController.maxSizeAttachmentsPerEmail?.value ?? 0, 0)),
|
||||
AppLocalizations.of(currentContext!).got_it,
|
||||
() => {},
|
||||
onConfirmAction: () => {},
|
||||
title: AppLocalizations.of(currentContext!).maximum_files_size,
|
||||
hasCancelButton: false);
|
||||
}
|
||||
@@ -1027,7 +1026,7 @@ class ComposerController extends BaseController {
|
||||
AppLocalizations.of(currentContext!).message_dialog_upload_attachments_exceeds_maximum_size(
|
||||
filesize(mailboxDashBoardController.maxSizeAttachmentsPerEmail?.value ?? 0, 0)),
|
||||
AppLocalizations.of(currentContext!).got_it,
|
||||
() => {},
|
||||
onConfirmAction: () => {},
|
||||
title: AppLocalizations.of(currentContext!).maximum_files_size,
|
||||
hasCancelButton: false,
|
||||
);
|
||||
@@ -1038,7 +1037,7 @@ class ComposerController extends BaseController {
|
||||
|
||||
if(arguments.emailContents != null && arguments.emailContents!.isNotEmpty) {
|
||||
_emailContents = arguments.emailContents;
|
||||
emailContentsViewState.value = Right(GetEmailContentSuccess(_emailContents!,[],[]));
|
||||
emailContentsViewState.value = Right(GetEmailContentSuccess(_emailContents!, [], [], false));
|
||||
} else {
|
||||
final baseDownloadUrl = mailboxDashBoardController.sessionCurrent?.getDownloadUrl();
|
||||
final accountId = mailboxDashBoardController.sessionCurrent?.accounts.keys.first;
|
||||
@@ -1339,7 +1338,7 @@ class ComposerController extends BaseController {
|
||||
AppLocalizations.of(currentContext!).message_dialog_upload_attachments_exceeds_maximum_size(
|
||||
filesize(mailboxDashBoardController.maxSizeAttachmentsPerEmail?.value ?? 0, 0)),
|
||||
AppLocalizations.of(currentContext!).got_it,
|
||||
() => {},
|
||||
onConfirmAction: () => {},
|
||||
title: AppLocalizations.of(currentContext!).maximum_files_size,
|
||||
hasCancelButton: false);
|
||||
}
|
||||
|
||||
@@ -215,6 +215,24 @@ class EmailController extends BaseController with AppLoaderMixin {
|
||||
emailContents.value = success.emailContentsDisplayed;
|
||||
initialEmailContents = success.emailContents;
|
||||
attachments.value = success.attachments;
|
||||
|
||||
if (success.readReceiptRequested) {
|
||||
_handleReadReceipt();
|
||||
}
|
||||
}
|
||||
|
||||
void _handleReadReceipt() {
|
||||
if (currentContext != null) {
|
||||
showConfirmDialogAction(currentContext!,
|
||||
AppLocalizations.of(currentContext!).subTitleReadReceiptRequestNotificationMessage,
|
||||
AppLocalizations.of(currentContext!).yes,
|
||||
onConfirmAction: () => {},
|
||||
showAsBottomSheet: true,
|
||||
title: AppLocalizations.of(currentContext!).titleReadReceiptRequestNotificationMessage,
|
||||
cancelTitle: AppLocalizations.of(currentContext!).no,
|
||||
icon: SvgPicture.asset(imagePaths.icReadReceiptMessage, fit: BoxFit.fill),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _resetToOriginalValue() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"@@last_modified": "2022-10-19T11:34:56.881127",
|
||||
"@@last_modified": "2022-10-19T15:56:55.354560",
|
||||
"initializing_data": "Initializing data...",
|
||||
"@initializing_data": {
|
||||
"type": "text",
|
||||
@@ -2301,5 +2301,29 @@
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"titleReadReceiptRequestNotificationMessage": "Read receipt request",
|
||||
"@titleReadReceiptRequestNotificationMessage": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"subTitleReadReceiptRequestNotificationMessage": "The sender has requested a Read receipt for this email. Send Read receipt?",
|
||||
"@subTitleReadReceiptRequestNotificationMessage": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"yes": "Yes",
|
||||
"@yes": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
},
|
||||
"no": "No",
|
||||
"@no": {
|
||||
"type": "text",
|
||||
"placeholders_order": [],
|
||||
"placeholders": {}
|
||||
}
|
||||
}
|
||||
@@ -2383,4 +2383,30 @@ class AppLocalizations {
|
||||
name: 'appGridTittle'
|
||||
);
|
||||
}
|
||||
|
||||
String get titleReadReceiptRequestNotificationMessage {
|
||||
return Intl.message(
|
||||
'Read receipt request',
|
||||
name: 'titleReadReceiptRequestNotificationMessage',
|
||||
);
|
||||
}
|
||||
|
||||
String get subTitleReadReceiptRequestNotificationMessage {
|
||||
return Intl.message(
|
||||
'The sender has requested a Read receipt for this email. Send Read receipt?',
|
||||
name: 'subTitleReadReceiptRequestNotificationMessage',
|
||||
);
|
||||
}
|
||||
|
||||
String get yes {
|
||||
return Intl.message(
|
||||
'Yes',
|
||||
name: 'yes');
|
||||
}
|
||||
|
||||
String get no {
|
||||
return Intl.message(
|
||||
'No',
|
||||
name: 'no');
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -77,7 +77,7 @@ packages:
|
||||
name: build_runner_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.2.4"
|
||||
version: "7.2.6"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -147,7 +147,7 @@ packages:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "3.1.0"
|
||||
core:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -413,7 +413,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: "5a27adb39dd8690ebbbea13171128633fe7aeae0"
|
||||
resolved-ref: ab07a8a03d63e20f6ea5e62bcc1ca8cdc1fd93ff
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
@@ -444,7 +444,7 @@ packages:
|
||||
name: logging
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.1.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -535,7 +535,7 @@ packages:
|
||||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -624,7 +624,7 @@ packages:
|
||||
name: stream_transform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -757,7 +757,7 @@ packages:
|
||||
name: watcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "1.0.2"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -778,7 +778,7 @@ packages:
|
||||
name: webview_flutter_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.10.3"
|
||||
version: "2.10.4"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
+10
-10
@@ -21,7 +21,7 @@ packages:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.3.1"
|
||||
version: "3.3.2"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -91,7 +91,7 @@ packages:
|
||||
name: build_runner_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.2.4"
|
||||
version: "7.2.6"
|
||||
built_collection:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -182,7 +182,7 @@ packages:
|
||||
name: connectivity_plus_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
version: "1.2.2"
|
||||
connectivity_plus_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -365,7 +365,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: email_supported
|
||||
resolved-ref: d81ae0169ae5030c0f250ac203056a2479dfd83a
|
||||
resolved-ref: "241d7ba620137d6534cc9bbb5fd10e182b93b94a"
|
||||
url: "https://github.com/linagora/enough_html_editor.git"
|
||||
source: git
|
||||
version: "0.0.5"
|
||||
@@ -723,7 +723,7 @@ packages:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "3.2.2"
|
||||
infinite_listview:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1005,7 +1005,7 @@ packages:
|
||||
name: permission_handler_apple
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "9.0.6"
|
||||
version: "9.0.7"
|
||||
permission_handler_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1019,7 +1019,7 @@ packages:
|
||||
name: permission_handler_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.1"
|
||||
version: "0.1.2"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1075,7 +1075,7 @@ packages:
|
||||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1273,7 +1273,7 @@ packages:
|
||||
name: syncfusion_flutter_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "20.3.49"
|
||||
version: "20.3.50"
|
||||
syncfusion_flutter_datepicker:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1434,7 +1434,7 @@ packages:
|
||||
name: watcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "1.0.2"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -77,7 +77,7 @@ packages:
|
||||
name: build_runner_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.2.4"
|
||||
version: "7.2.6"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -140,7 +140,7 @@ packages:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "3.1.0"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -268,7 +268,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: "5a27adb39dd8690ebbbea13171128633fe7aeae0"
|
||||
resolved-ref: ab07a8a03d63e20f6ea5e62bcc1ca8cdc1fd93ff
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
@@ -306,7 +306,7 @@ packages:
|
||||
name: logging
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.1.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -369,7 +369,7 @@ packages:
|
||||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -409,7 +409,7 @@ packages:
|
||||
name: source_gen
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.5"
|
||||
version: "1.2.6"
|
||||
source_helper:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -444,7 +444,7 @@ packages:
|
||||
name: stream_transform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -493,7 +493,7 @@ packages:
|
||||
name: watcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "1.0.2"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user