From f8bb996622ef7871557cbadd96e39c6acb2f3a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Mon, 17 Nov 2025 13:26:11 +0100 Subject: [PATCH 1/3] chore: Simplify adaptive bottom sheet code --- lib/pages/chat/start_poll_bottom_sheet.dart | 1 - lib/utils/adaptive_bottom_sheet.dart | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/pages/chat/start_poll_bottom_sheet.dart b/lib/pages/chat/start_poll_bottom_sheet.dart index bc05a2a6e..fd14c4186 100644 --- a/lib/pages/chat/start_poll_bottom_sheet.dart +++ b/lib/pages/chat/start_poll_bottom_sheet.dart @@ -146,7 +146,6 @@ class _StartPollBottomSheetState extends State { ), title: Text(L10n.of(context).allowMultipleAnswers), ), - const SizedBox(height: 8), ElevatedButton( onPressed: !isLoading && _canCreate ? _createPoll : null, child: isLoading diff --git a/lib/utils/adaptive_bottom_sheet.dart b/lib/utils/adaptive_bottom_sheet.dart index b39535fbf..c686471dd 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -40,25 +40,13 @@ Future showAdaptiveBottomSheet({ return showModalBottomSheet( context: context, - useSafeArea: true, - builder: (context) => Padding( - padding: EdgeInsets.zero, - child: ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(AppConfig.borderRadius / 2), - topRight: Radius.circular(AppConfig.borderRadius / 2), - ), - child: builder(context), - ), - ), + builder: builder, useRootNavigator: useRootNavigator, isDismissible: isDismissible, isScrollControlled: isScrollControlled, constraints: BoxConstraints( maxHeight: min(MediaQuery.sizeOf(context).height - 32, 600), - maxWidth: FluffyThemes.columnWidth * 1.25, ), - backgroundColor: Colors.transparent, clipBehavior: Clip.hardEdge, ); } From 09f96e48d1223fe333a34954e6d482e2c8606c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Mon, 17 Nov 2025 13:51:19 +0100 Subject: [PATCH 2/3] fix: Make keyboard moving bottom sheet up --- lib/utils/adaptive_bottom_sheet.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/utils/adaptive_bottom_sheet.dart b/lib/utils/adaptive_bottom_sheet.dart index c686471dd..7681e54f7 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -40,13 +40,20 @@ Future showAdaptiveBottomSheet({ return showModalBottomSheet( context: context, - builder: builder, + builder: (context) => ConstrainedBox( + constraints: BoxConstraints( + maxHeight: MediaQuery.viewInsetsOf(context).bottom + + min( + MediaQuery.sizeOf(context).height - 32, + 600, + ), + ), + child: builder(context), + ), + useSafeArea: true, useRootNavigator: useRootNavigator, isDismissible: isDismissible, isScrollControlled: isScrollControlled, - constraints: BoxConstraints( - maxHeight: min(MediaQuery.sizeOf(context).height - 32, 600), - ), clipBehavior: Clip.hardEdge, ); } From 06fe6ad37bcf06c4e2d5c356ddaf3b59ea93c2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Mon, 17 Nov 2025 13:54:59 +0100 Subject: [PATCH 3/3] fix: No description for video and audio messages displayed --- lib/utils/file_description.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/file_description.dart b/lib/utils/file_description.dart index a1d766aee..639d11632 100644 --- a/lib/utils/file_description.dart +++ b/lib/utils/file_description.dart @@ -5,6 +5,9 @@ extension FileDescriptionExtension on Event { if (!{ MessageTypes.File, MessageTypes.Image, + MessageTypes.Sticker, + MessageTypes.Video, + MessageTypes.Audio, }.contains(messageType)) { return null; }