@@ -5,11 +5,13 @@ import '../api/route/channels.dart';
55import '../generated/l10n/zulip_localizations.dart' ;
66import '../log.dart' ;
77import '../model/channel.dart' ;
8+ import '../model/narrow.dart' ;
89import 'action_sheet.dart' ;
910import 'actions.dart' ;
1011import 'app_bar.dart' ;
1112import 'button.dart' ;
1213import 'icons.dart' ;
14+ import 'message_list.dart' ;
1315import 'page.dart' ;
1416import 'remote_settings.dart' ;
1517import 'store.dart' ;
@@ -98,26 +100,32 @@ class AllChannelsListEntry extends StatelessWidget {
98100
99101 return Padding (
100102 padding: EdgeInsetsDirectional .only (start: 8 , end: 4 ),
101- child: Row (spacing: 6 , children: [
102- Icon (
103- size: 20 ,
104- color: colorSwatchFor (context, subscription).iconOnPlainBackground,
105- iconDataForStream (channel)),
106- Expanded (
107- child: Text (
108- style: TextStyle (
109- color: designVariables.textMessage,
110- fontSize: 17 ,
111- height: 20 / 17 ,
112- ).merge (weightVariableTextStyle (context, wght: 600 )),
113- channel.name)),
114- if (hasContentAccess) _SubscribeToggle (channel: channel),
115- ZulipIconButton (
116- icon: ZulipIcons .more_horizontal,
117- onPressed: () {
118- showChannelActionSheet (context, channelId: channel.streamId);
119- }),
120- ]));
103+ child: GestureDetector (
104+ onTap: () {
105+ Navigator .push (context, MessageListPage .buildRoute (
106+ context: context,
107+ narrow: ChannelNarrow (channel.streamId)));
108+ },
109+ onLongPress: () {
110+ showChannelActionSheet (context, channelId: channel.streamId);
111+ },
112+ child: SizedBox (
113+ height: 36 ,
114+ child: Row (spacing: 6 , children: [
115+ Icon (
116+ size: 20 ,
117+ color: colorSwatchFor (context, subscription).iconOnPlainBackground,
118+ iconDataForStream (channel)),
119+ Expanded (
120+ child: Text (
121+ style: TextStyle (
122+ color: designVariables.textMessage,
123+ fontSize: 17 ,
124+ height: 20 / 17 ,
125+ ).merge (weightVariableTextStyle (context, wght: 600 )),
126+ channel.name)),
127+ hasContentAccess ? _SubscribeToggle (channel: channel): const SizedBox .shrink (),
128+ ]))));
121129 }
122130}
123131
0 commit comments