@@ -41,7 +41,7 @@ import 'topic_list.dart';
41
41
void _showContextMenu (
42
42
BuildContext pageContext, {
43
43
Widget ? header,
44
- required List <Widget > buttons ,
44
+ required List <List < Widget >> buttonSections ,
45
45
}) {
46
46
// Could omit this if we need _showActionSheet outside a per-account context.
47
47
final accountId = PerAccountStoreWidget .accountIdOf (pageContext);
@@ -95,7 +95,11 @@ void _showContextMenu(
95
95
color: designVariables.bgContextMenu,
96
96
child: SingleChildScrollView (
97
97
padding: const EdgeInsets .symmetric (vertical: 8 ),
98
- child: MenuButtonsShape (buttons: buttons)))),
98
+ child: Column (
99
+ mainAxisSize: MainAxisSize .min,
100
+ spacing: 8 ,
101
+ children: buttonSections.map ((buttons) =>
102
+ MenuButtonsShape (buttons: buttons)).toList ())))),
99
103
const BottomSheetDismissButton (style: BottomSheetDismissButtonStyle .cancel),
100
104
]))),
101
105
]))));
@@ -259,7 +263,7 @@ void showChannelActionSheet(BuildContext context, {
259
263
buttons.add (
260
264
CopyChannelLinkButton (channelId: channelId, pageContext: pageContext));
261
265
262
- _showContextMenu (pageContext, buttons : buttons);
266
+ _showContextMenu (pageContext, buttonSections : [ buttons] );
263
267
}
264
268
265
269
class MarkChannelAsReadButton extends ContextMenuItemButton {
@@ -444,7 +448,7 @@ void showTopicActionSheet(BuildContext context, {
444
448
narrow: TopicNarrow (channelId, topic, with_: someMessageIdInTopic),
445
449
pageContext: context));
446
450
447
- _showContextMenu (pageContext, buttons : buttons);
451
+ _showContextMenu (pageContext, buttonSections : [ buttons] );
448
452
}
449
453
450
454
class UserTopicUpdateButton extends ContextMenuItemButton {
@@ -736,7 +740,7 @@ void showMessageActionSheet({required BuildContext context, required Message mes
736
740
];
737
741
738
742
_showContextMenu (pageContext,
739
- buttons : buttons,
743
+ buttonSections : [ buttons] ,
740
744
header: _MessageActionSheetHeader (message: message));
741
745
}
742
746
0 commit comments