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 @@ -245,21 +245,17 @@ void showChannelActionSheet(BuildContext context, {
245245 final pageContext = PageRoot .contextOf (context);
246246 final store = PerAccountStoreWidget .of (pageContext);
247247
248- final optionButtons = < ActionSheetMenuItemButton > [];
249-
250248 final unreadCount = store.unreads.countInChannelNarrow (channelId);
251- if (unreadCount > 0 ) {
252- optionButtons.add (
253- MarkChannelAsReadButton (pageContext: pageContext, channelId: channelId));
254- }
255-
256- optionButtons.add (
257- TopicListButton (pageContext: pageContext, channelId: channelId));
258-
259- optionButtons.add (
260- CopyChannelLinkButton (channelId: channelId, pageContext: pageContext));
249+ final buttonSections = [
250+ [
251+ if (unreadCount > 0 )
252+ MarkChannelAsReadButton (pageContext: pageContext, channelId: channelId),
253+ TopicListButton (pageContext: pageContext, channelId: channelId),
254+ CopyChannelLinkButton (channelId: channelId, pageContext: pageContext)
255+ ]
256+ ];
261257
262- _showActionSheet (pageContext, buttonSections: [optionButtons] );
258+ _showActionSheet (pageContext, buttonSections: buttonSections );
263259}
264260
265261class MarkChannelAsReadButton extends ActionSheetMenuItemButton {
You can’t perform that action at this time.
0 commit comments