TF-2667 Prevent close sending/saving dialog when click system back on mobile
This commit is contained in:
@@ -826,8 +826,7 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
required String emailContent,
|
||||
CancelToken? cancelToken
|
||||
}) {
|
||||
return Get.dialog(
|
||||
PointerInterceptor(
|
||||
final childWidget = PointerInterceptor(
|
||||
child: SendingMessageDialogView(
|
||||
createEmailRequest: CreateEmailRequest(
|
||||
session: mailboxDashBoardController.sessionCurrent!,
|
||||
@@ -858,7 +857,13 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
onCancelSendingEmailAction: _handleCancelSendingMessage,
|
||||
cancelToken: cancelToken,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return Get.dialog(
|
||||
PlatformInfo.isMobile
|
||||
? PopScope(canPop: false, child: childWidget)
|
||||
: childWidget,
|
||||
barrierDismissible: false,
|
||||
barrierColor: AppColor.colorDefaultCupertinoActionSheet,
|
||||
);
|
||||
}
|
||||
@@ -2035,8 +2040,7 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
EmailId? draftEmailId,
|
||||
CancelToken? cancelToken,
|
||||
}) {
|
||||
return Get.dialog(
|
||||
PointerInterceptor(
|
||||
final childWidget = PointerInterceptor(
|
||||
child: SavingMessageDialogView(
|
||||
createEmailRequest: CreateEmailRequest(
|
||||
session: mailboxDashBoardController.sessionCurrent!,
|
||||
@@ -2065,7 +2069,12 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
onCancelSavingEmailToDraftsAction: _handleCancelSavingMessageToDrafts,
|
||||
cancelToken: cancelToken,
|
||||
),
|
||||
),
|
||||
);
|
||||
return Get.dialog(
|
||||
PlatformInfo.isMobile
|
||||
? PopScope(canPop: false, child: childWidget)
|
||||
: childWidget,
|
||||
barrierDismissible: false,
|
||||
barrierColor: AppColor.colorDefaultCupertinoActionSheet,
|
||||
);
|
||||
}
|
||||
|
||||
+5
@@ -1391,7 +1391,12 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
openComposerOverlay(arguments);
|
||||
}
|
||||
} else {
|
||||
BackButtonInterceptor.removeByName(AppRoutes.dashboard);
|
||||
|
||||
final result = await push(AppRoutes.composer, arguments: arguments);
|
||||
|
||||
BackButtonInterceptor.add(_onBackButtonInterceptor, name: AppRoutes.dashboard);
|
||||
|
||||
if (result is SendingEmailArguments) {
|
||||
handleSendEmailAction(result);
|
||||
} else if (result is SendEmailSuccess ||
|
||||
|
||||
Reference in New Issue
Block a user