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..7681e54f7 100644 --- a/lib/utils/adaptive_bottom_sheet.dart +++ b/lib/utils/adaptive_bottom_sheet.dart @@ -40,25 +40,20 @@ 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: (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), - maxWidth: FluffyThemes.columnWidth * 1.25, - ), - backgroundColor: Colors.transparent, clipBehavior: Clip.hardEdge, ); } 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; }