TF-4014 Fix copy and paste images is broken after going full screen

This commit is contained in:
dab246
2025-09-15 15:25:33 +07:00
committed by Dat H. Pham
parent 03694d8848
commit 9abde49c62
5 changed files with 12 additions and 10 deletions
@@ -2388,7 +2388,7 @@ class ComposerController extends BaseController
required BuildContext context,
required double maxWidth
}) {
if (responsiveUtils.isMobile(context)) {
if (context.mounted && responsiveUtils.isMobile(context)) {
maxWithEditor = maxWidth - 40;
} else {
maxWithEditor = maxWidth - 70;
@@ -2418,6 +2418,8 @@ class ComposerController extends BaseController
required UploadError uploadError
}) {
logError('ComposerController::handleOnPasteImageFailureAction: $uploadError');
if (!context.mounted) return;
appToast.showToastErrorMessage(
context,
AppLocalizations.of(context).thisImageCannotBePastedIntoTheEditor);