@@ -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' ;
@@ -96,29 +98,28 @@ class AllChannelsListEntry extends StatelessWidget {
9698 final Subscription ? subscription = channel is Subscription ? channel : null ;
9799 final hasContentAccess = store.selfHasContentAccess (channel);
98100
99- return ConstrainedBox (constraints: const BoxConstraints (minHeight: 44 ),
100- child: Padding (
101- padding: EdgeInsetsDirectional .only (start: 8 , end: 4 ),
102- child: Row (spacing: 6 , children: [
103- Icon (
104- size: 20 ,
105- color: colorSwatchFor (context, subscription).iconOnPlainBackground,
106- iconDataForStream (channel)),
107- Expanded (
108- child: Text (
109- style: TextStyle (
110- color: designVariables.textMessage,
111- fontSize: 17 ,
112- height: 20 / 17 ,
113- ).merge (weightVariableTextStyle (context, wght: 600 )),
114- channel.name)),
115- if (hasContentAccess) _SubscribeToggle (channel: channel),
116- ZulipIconButton (
117- icon: ZulipIcons .more_horizontal,
118- onPressed: () {
119- showChannelActionSheet (context, channelId: channel.streamId);
120- }),
121- ])));
101+ return InkWell (
102+ onTap: ! hasContentAccess ? null : () => Navigator .push (context,
103+ MessageListPage .buildRoute (context: context,
104+ narrow: ChannelNarrow (channel.streamId))),
105+ onLongPress: () => showChannelActionSheet (context, channelId: channel.streamId),
106+ child: ConstrainedBox (constraints: const BoxConstraints (minHeight: 44 ),
107+ child: Padding (padding: const EdgeInsetsDirectional .only (start: 8 , end: 12 ),
108+ child: Row (spacing: 6 , children: [
109+ Icon (
110+ size: 20 ,
111+ color: colorSwatchFor (context, subscription).iconOnPlainBackground,
112+ iconDataForStream (channel)),
113+ Expanded (
114+ child: Text (
115+ style: TextStyle (
116+ color: designVariables.textMessage,
117+ fontSize: 17 ,
118+ height: 20 / 17 ,
119+ ).merge (weightVariableTextStyle (context, wght: 600 )),
120+ channel.name)),
121+ if (hasContentAccess) _SubscribeToggle (channel: channel),
122+ ]))));
122123 }
123124}
124125
0 commit comments