File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -249,21 +249,17 @@ void showChannelActionSheet(BuildContext context, {
249
249
final pageContext = PageRoot .contextOf (context);
250
250
final store = PerAccountStoreWidget .of (pageContext);
251
251
252
- final buttons = < ContextMenuItemButton > [];
253
-
254
252
final unreadCount = store.unreads.countInChannelNarrow (channelId);
255
- if (unreadCount > 0 ) {
256
- buttons.add (
257
- MarkChannelAsReadButton (pageContext: pageContext, channelId: channelId));
258
- }
259
-
260
- buttons.add (
261
- TopicListButton (pageContext: pageContext, channelId: channelId));
262
-
263
- buttons.add (
264
- CopyChannelLinkButton (channelId: channelId, pageContext: pageContext));
253
+ final buttonSections = [
254
+ [
255
+ if (unreadCount > 0 )
256
+ MarkChannelAsReadButton (pageContext: pageContext, channelId: channelId),
257
+ TopicListButton (pageContext: pageContext, channelId: channelId),
258
+ CopyChannelLinkButton (channelId: channelId, pageContext: pageContext)
259
+ ]
260
+ ];
265
261
266
- _showContextMenu (pageContext, buttonSections: [buttons] );
262
+ _showContextMenu (pageContext, buttonSections: buttonSections );
267
263
}
268
264
269
265
class MarkChannelAsReadButton extends ContextMenuItemButton {
You can’t perform that action at this time.
0 commit comments