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 BuildContext context,
|
||||||
required double maxWidth
|
required double maxWidth
|
||||||
}) {
|
}) {
|
||||||
if (responsiveUtils.isMobile(context)) {
|
if (context.mounted && responsiveUtils.isMobile(context)) {
|
||||||
maxWithEditor = maxWidth - 40;
|
maxWithEditor = maxWidth - 40;
|
||||||
} else {
|
} else {
|
||||||
maxWithEditor = maxWidth - 70;
|
maxWithEditor = maxWidth - 70;
|
||||||
@@ -2418,6 +2418,8 @@ class ComposerController extends BaseController
|
|||||||
required UploadError uploadError
|
required UploadError uploadError
|
||||||
}) {
|
}) {
|
||||||
logError('ComposerController::handleOnPasteImageFailureAction: $uploadError');
|
logError('ComposerController::handleOnPasteImageFailureAction: $uploadError');
|
||||||
|
if (!context.mounted) return;
|
||||||
|
|
||||||
appToast.showToastErrorMessage(
|
appToast.showToastErrorMessage(
|
||||||
context,
|
context,
|
||||||
AppLocalizations.of(context).thisImageCannotBePastedIntoTheEditor);
|
AppLocalizations.of(context).thisImageCannotBePastedIntoTheEditor);
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, constraintsEditor) {
|
builder: (_, constraintsEditor) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
@@ -364,7 +364,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
desktop: Obx(() => DesktopResponsiveContainerView(
|
desktop: Obx(() => DesktopResponsiveContainerView(
|
||||||
childBuilder: (context, constraints) {
|
childBuilder: (_, constraints) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => controller.clickOutsideComposer(context),
|
onTap: () => controller.clickOutsideComposer(context),
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
@@ -520,7 +520,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, constraintsEditor) {
|
builder: (_, constraintsEditor) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
@@ -689,7 +689,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
onChangeDisplayModeAction: controller.displayScreenTypeComposerAction,
|
onChangeDisplayModeAction: controller.displayScreenTypeComposerAction,
|
||||||
)),
|
)),
|
||||||
tablet: TabletResponsiveContainerView(
|
tablet: TabletResponsiveContainerView(
|
||||||
childBuilder: (context, constraints) {
|
childBuilder: (_, constraints) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => controller.clickOutsideComposer(context),
|
onTap: () => controller.clickOutsideComposer(context),
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
@@ -843,7 +843,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (context, constraintsBody) {
|
builder: (_, constraintsBody) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class DesktopResponsiveContainerView extends StatelessWidget {
|
|||||||
height: composerManager.composerIdsQueue.length > 1
|
height: composerManager.composerIdsQueue.length > 1
|
||||||
? DesktopResponsiveContainerViewStyle.normalScreenMaxHeight
|
? DesktopResponsiveContainerViewStyle.normalScreenMaxHeight
|
||||||
: responsiveUtils.getSizeScreenHeight(context) * 0.85,
|
: responsiveUtils.getSizeScreenHeight(context) * 0.85,
|
||||||
child: LayoutBuilder(builder: (context, constraints) =>
|
child: LayoutBuilder(builder: (_, constraints) =>
|
||||||
PointerInterceptor(
|
PointerInterceptor(
|
||||||
child: childBuilder.call(context, constraints),
|
child: childBuilder.call(context, constraints),
|
||||||
)
|
)
|
||||||
@@ -80,7 +80,7 @@ class DesktopResponsiveContainerView extends StatelessWidget {
|
|||||||
color: DesktopResponsiveContainerViewStyle.backgroundColor,
|
color: DesktopResponsiveContainerViewStyle.backgroundColor,
|
||||||
width: maxWidth,
|
width: maxWidth,
|
||||||
height: maxHeight,
|
height: maxHeight,
|
||||||
child: LayoutBuilder(builder: (context, constraints) =>
|
child: LayoutBuilder(builder: (_, constraints) =>
|
||||||
PointerInterceptor(
|
PointerInterceptor(
|
||||||
child: childBuilder.call(context, constraints)
|
child: childBuilder.call(context, constraints)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class MobileResponsiveContainerView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: MobileResponsiveContainerViewStyle.outSideBackgroundColor,
|
backgroundColor: MobileResponsiveContainerViewStyle.outSideBackgroundColor,
|
||||||
body: LayoutBuilder(builder: (context, constraints) =>
|
body: LayoutBuilder(builder: (_, constraints) =>
|
||||||
PointerInterceptor(
|
PointerInterceptor(
|
||||||
child: childBuilder.call(context, constraints)
|
child: childBuilder.call(context, constraints)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class TabletResponsiveContainerView extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
color: TabletResponsiveContainerViewStyle.backgroundColor,
|
color: TabletResponsiveContainerViewStyle.backgroundColor,
|
||||||
width: TabletResponsiveContainerViewStyle.getWidth(context, _responsiveUtils),
|
width: TabletResponsiveContainerViewStyle.getWidth(context, _responsiveUtils),
|
||||||
child: LayoutBuilder(builder: (context, constraints) =>
|
child: LayoutBuilder(builder: (_, constraints) =>
|
||||||
PointerInterceptor(
|
PointerInterceptor(
|
||||||
child: childBuilder.call(context, constraints)
|
child: childBuilder.call(context, constraints)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user