TF-4014 Fix copy and paste images is broken after going full screen
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -240,7 +240,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
),
|
||||
Expanded(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraintsEditor) {
|
||||
builder: (_, constraintsEditor) {
|
||||
return Stack(
|
||||
children: [
|
||||
Column(
|
||||
@@ -364,7 +364,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
}
|
||||
),
|
||||
desktop: Obx(() => DesktopResponsiveContainerView(
|
||||
childBuilder: (context, constraints) {
|
||||
childBuilder: (_, constraints) {
|
||||
return GestureDetector(
|
||||
onTap: () => controller.clickOutsideComposer(context),
|
||||
child: Column(children: [
|
||||
@@ -520,7 +520,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
),
|
||||
Expanded(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraintsEditor) {
|
||||
builder: (_, constraintsEditor) {
|
||||
return Stack(
|
||||
children: [
|
||||
Column(
|
||||
@@ -689,7 +689,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
onChangeDisplayModeAction: controller.displayScreenTypeComposerAction,
|
||||
)),
|
||||
tablet: TabletResponsiveContainerView(
|
||||
childBuilder: (context, constraints) {
|
||||
childBuilder: (_, constraints) {
|
||||
return GestureDetector(
|
||||
onTap: () => controller.clickOutsideComposer(context),
|
||||
child: Column(children: [
|
||||
@@ -843,7 +843,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
),
|
||||
Expanded(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraintsBody) {
|
||||
builder: (_, constraintsBody) {
|
||||
return Stack(
|
||||
children: [
|
||||
Column(
|
||||
|
||||
@@ -56,7 +56,7 @@ class DesktopResponsiveContainerView extends StatelessWidget {
|
||||
height: composerManager.composerIdsQueue.length > 1
|
||||
? DesktopResponsiveContainerViewStyle.normalScreenMaxHeight
|
||||
: responsiveUtils.getSizeScreenHeight(context) * 0.85,
|
||||
child: LayoutBuilder(builder: (context, constraints) =>
|
||||
child: LayoutBuilder(builder: (_, constraints) =>
|
||||
PointerInterceptor(
|
||||
child: childBuilder.call(context, constraints),
|
||||
)
|
||||
@@ -80,7 +80,7 @@ class DesktopResponsiveContainerView extends StatelessWidget {
|
||||
color: DesktopResponsiveContainerViewStyle.backgroundColor,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
child: LayoutBuilder(builder: (context, constraints) =>
|
||||
child: LayoutBuilder(builder: (_, constraints) =>
|
||||
PointerInterceptor(
|
||||
child: childBuilder.call(context, constraints)
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ class MobileResponsiveContainerView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: MobileResponsiveContainerViewStyle.outSideBackgroundColor,
|
||||
body: LayoutBuilder(builder: (context, constraints) =>
|
||||
body: LayoutBuilder(builder: (_, constraints) =>
|
||||
PointerInterceptor(
|
||||
child: childBuilder.call(context, constraints)
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@ class TabletResponsiveContainerView extends StatelessWidget {
|
||||
child: Container(
|
||||
color: TabletResponsiveContainerViewStyle.backgroundColor,
|
||||
width: TabletResponsiveContainerViewStyle.getWidth(context, _responsiveUtils),
|
||||
child: LayoutBuilder(builder: (context, constraints) =>
|
||||
child: LayoutBuilder(builder: (_, constraints) =>
|
||||
PointerInterceptor(
|
||||
child: childBuilder.call(context, constraints)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user