diff --git a/mobile/lib/features/channels/compose_bar/attachments.dart b/mobile/lib/features/channels/compose_bar/attachments.dart index bb617b5c7..7c53ae109 100644 --- a/mobile/lib/features/channels/compose_bar/attachments.dart +++ b/mobile/lib/features/channels/compose_bar/attachments.dart @@ -9,8 +9,6 @@ const _attachmentMenuItemSpacing = Grid.xxs; const _attachmentMenuIconSize = 24.0; const _attachmentMenuIconSlotWidth = 28.0; const _attachmentExpandedHeight = 372.0; -const _tabletAttachmentCameraMaxHeight = 640.0; -const _tabletShortestSideBreakpoint = 600.0; @immutable class _AttachmentMenuLayout { @@ -172,17 +170,7 @@ class _AttachmentSurfacePanel extends HookWidget { return LayoutBuilder( builder: (context, constraints) { final expandedWidth = constraints.maxWidth; - final isTablet = - MediaQuery.sizeOf(context).shortestSide >= - _tabletShortestSideBreakpoint; - final expandedHeight = - visibleExpandedSurface == _AttachmentSurface.camera && isTablet - // Use the available chat-pane width rather than a fixed landscape - // height. On a tablet's three-pane layout this keeps the camera - // preview close to square, even though the pane itself is narrower - // than the full device width. - ? math.min(expandedWidth, _tabletAttachmentCameraMaxHeight) - : _attachmentExpandedHeight; + const expandedHeight = _attachmentExpandedHeight; final width = _attachmentMenuWidth + ((expandedWidth - _attachmentMenuWidth) * sizeProgress); diff --git a/mobile/test/features/channels/compose_bar_test.dart b/mobile/test/features/channels/compose_bar_test.dart index 6080aacc7..5515bcbc1 100644 --- a/mobile/test/features/channels/compose_bar_test.dart +++ b/mobile/test/features/channels/compose_bar_test.dart @@ -1402,7 +1402,7 @@ void main() { } }); - testWidgets('uses a taller camera surface on tablet-width layouts', ( + testWidgets('keeps the mobile camera surface geometry on tablet widths', ( tester, ) async { final previousPlatform = debugDefaultTargetPlatformOverride; @@ -1429,7 +1429,7 @@ void main() { expect( tester.getSize(find.byKey(const ValueKey('camera-preview'))).height, - 640, + 372, ); } finally { debugDefaultTargetPlatformOverride = previousPlatform;