diff --git a/lib/features/composer/presentation/view/web/composer_overlay_view.dart b/lib/features/composer/presentation/view/web/composer_overlay_view.dart index 0d9aa06b5..2025d7be2 100644 --- a/lib/features/composer/presentation/view/web/composer_overlay_view.dart +++ b/lib/features/composer/presentation/view/web/composer_overlay_view.dart @@ -34,29 +34,17 @@ class ComposerOverlayView extends StatelessWidget { if (composerIdsQueue.length == 1) { final composerView = composerManager.getComposerView(composerIdsQueue.first); - if (composerView.controller.isHiddenScreen) { - return Stack( - children: [ - Align( - alignment: AlignmentDirectional.bottomEnd, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Padding( - padding: const EdgeInsetsDirectional.all(ComposerStyle.padding), - child: ExpandComposerButton( - countComposerHidden: 1, - onRemoveHiddenComposerItem: (controller) => - controller.handleClickCloseComposer(context), - onShowComposerAction: composerManager.showComposerIfHidden, - ), - ), - ), - ), - ], - ); - } else { - return composerView; - } + return Padding( + padding: const EdgeInsetsDirectional.all(ComposerStyle.padding), + child: composerView.controller.isHiddenScreen + ? ExpandComposerButton( + countComposerHidden: 1, + onRemoveHiddenComposerItem: (controller) => + controller.handleClickCloseComposer(context), + onShowComposerAction: composerManager.showComposerIfHidden, + ) + : composerView, + ); } final countComposerHidden = composerManager.countComposerHidden; @@ -65,32 +53,25 @@ class ComposerOverlayView extends StatelessWidget { .where((view) => !view.controller.isHiddenScreen) .toList(); - return Stack( - children: [ - Align( - alignment: AlignmentDirectional.bottomEnd, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Padding( - padding: const EdgeInsetsDirectional.all(ComposerStyle.padding), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisSize: MainAxisSize.min, - children: [ - if (countComposerHidden > 0) - ExpandComposerButton( - countComposerHidden: countComposerHidden, - onRemoveHiddenComposerItem: (controller) => - controller.handleClickCloseComposer(context), - onShowComposerAction: composerManager.showComposerIfHidden, - ), - ...visibleComposers, - ], + return SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Padding( + padding: const EdgeInsetsDirectional.all(ComposerStyle.padding), + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.min, + children: [ + if (countComposerHidden > 0) + ExpandComposerButton( + countComposerHidden: countComposerHidden, + onRemoveHiddenComposerItem: (controller) => + controller.handleClickCloseComposer(context), + onShowComposerAction: composerManager.showComposerIfHidden, ), - ), - ), + ...visibleComposers, + ], ), - ], + ), ); }); } diff --git a/lib/features/composer/presentation/view/web/desktop_responsive_container_view.dart b/lib/features/composer/presentation/view/web/desktop_responsive_container_view.dart index 916e141e9..090376a10 100644 --- a/lib/features/composer/presentation/view/web/desktop_responsive_container_view.dart +++ b/lib/features/composer/presentation/view/web/desktop_responsive_container_view.dart @@ -33,7 +33,7 @@ class DesktopResponsiveContainerView extends StatelessWidget { @override Widget build(BuildContext context) { if (displayMode == ScreenDisplayMode.minimize) { - final composerWidget = PointerInterceptor( + return PointerInterceptor( child: MinimizeComposerWidget( imagePaths: imagePaths, emailSubject: emailSubject, @@ -41,16 +41,8 @@ class DesktopResponsiveContainerView extends StatelessWidget { onChangeDisplayModeAction: onChangeDisplayModeAction, ), ); - - return composerManager.composerIdsQueue.length == 1 - ? PositionedDirectional( - end: DesktopResponsiveContainerViewStyle.margin, - bottom: DesktopResponsiveContainerViewStyle.margin, - child: composerWidget, - ) - : composerWidget; } else if (displayMode == ScreenDisplayMode.normal) { - final composerWidget = Card( + return Card( elevation: DesktopResponsiveContainerViewStyle.elevation, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(DesktopResponsiveContainerViewStyle.radius)), @@ -67,14 +59,6 @@ class DesktopResponsiveContainerView extends StatelessWidget { ), ), ); - - return composerManager.composerIdsQueue.length == 1 - ? PositionedDirectional( - end: DesktopResponsiveContainerViewStyle.margin, - bottom: DesktopResponsiveContainerViewStyle.margin, - child: composerWidget, - ) - : composerWidget; } else if (displayMode == ScreenDisplayMode.fullScreen) { final maxWidth = responsiveUtils.getSizeScreenWidth(context) * 0.85; final maxHeight = responsiveUtils.getSizeScreenHeight(context) * 0.9; diff --git a/lib/features/mailbox_dashboard/presentation/model/composer_overlay_state.dart b/lib/features/mailbox_dashboard/presentation/model/composer_overlay_state.dart deleted file mode 100644 index ecef007f3..000000000 --- a/lib/features/mailbox_dashboard/presentation/model/composer_overlay_state.dart +++ /dev/null @@ -1,4 +0,0 @@ - -enum ComposerOverlayState { - active, inActive -} \ No newline at end of file