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, {
245
245
final pageContext = PageRoot .contextOf (context);
246
246
final store = PerAccountStoreWidget .of (pageContext);
247
247
248
- final optionButtons = < ActionSheetMenuItemButton > [];
249
-
250
248
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
+ ];
261
257
262
- _showActionSheet (pageContext, buttonSections: [optionButtons] );
258
+ _showActionSheet (pageContext, buttonSections: buttonSections );
263
259
}
264
260
265
261
class MarkChannelAsReadButton extends ActionSheetMenuItemButton {
You can’t perform that action at this time.
0 commit comments