@@ -28,6 +28,7 @@ import 'page.dart';
28
28
import 'store.dart' ;
29
29
import 'text.dart' ;
30
30
import 'theme.dart' ;
31
+ import 'topic_list.dart' ;
31
32
32
33
void _showActionSheet (
33
34
BuildContext context, {
@@ -173,23 +174,46 @@ void showChannelActionSheet(BuildContext context, {
173
174
final store = PerAccountStoreWidget .of (pageContext);
174
175
175
176
final optionButtons = < ActionSheetMenuItemButton > [];
177
+
178
+ optionButtons.add (
179
+ TopicListButton (pageContext: pageContext, channelId: channelId));
180
+
176
181
final unreadCount = store.unreads.countInChannelNarrow (channelId);
177
182
if (unreadCount > 0 ) {
178
183
optionButtons.add (
179
184
MarkChannelAsReadButton (pageContext: pageContext, channelId: channelId));
180
185
}
181
- if (optionButtons.isEmpty) {
182
- // TODO(a11y): This case makes a no-op gesture handler; as a consequence,
183
- // we're presenting some UI (to people who use screen-reader software) as
184
- // though it offers a gesture interaction that it doesn't meaningfully
185
- // offer, which is confusing. The solution here is probably to remove this
186
- // is-empty case by having at least one button that's always present,
187
- // such as "copy link to channel".
188
- return ;
189
- }
186
+
190
187
_showActionSheet (pageContext, optionButtons: optionButtons);
191
188
}
192
189
190
+ class TopicListButton extends ActionSheetMenuItemButton {
191
+ const TopicListButton ({
192
+ super .key,
193
+ required this .channelId,
194
+ required super .pageContext,
195
+ });
196
+
197
+ final int channelId;
198
+
199
+ @override
200
+ IconData get icon => ZulipIcons .message_feed;
201
+
202
+ @override
203
+ String label (ZulipLocalizations zulipLocalizations) {
204
+ return zulipLocalizations.actionSheetOptionTopicList;
205
+ }
206
+
207
+ @override
208
+ void onPressed () {
209
+ Navigator .push (pageContext,
210
+ TopicListPage .buildRoute (
211
+ context: pageContext,
212
+ streamId: channelId,
213
+ ));
214
+ }
215
+ }
216
+
193
217
class MarkChannelAsReadButton extends ActionSheetMenuItemButton {
194
218
const MarkChannelAsReadButton ({
195
219
super .key,
0 commit comments