Skip to content

Commit

Permalink
msglist: Make DM recipient header touchable
Browse files Browse the repository at this point in the history
Fixes: #142
  • Loading branch information
gnprice committed Jun 8, 2023
1 parent baa44cb commit f7feabf
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,22 @@ class DmRecipientHeader extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.centerLeft,
child: RecipientHeaderChevronContainer(
color: _kDmRecipientHeaderColor,
child: const Text("Direct message", // TODO DM recipient headers
style: TextStyle(color: Colors.white))));
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
final store = PerAccountStoreWidget.of(context);
final narrow = DmNarrow(
allRecipientIds: message.allRecipientIds.toList(growable: false),
selfUserId: store.account.userId);
Navigator.push(context,
MessageListPage.buildRoute(context: context, narrow: narrow));
},
child: Align(
alignment: Alignment.centerLeft,
child: RecipientHeaderChevronContainer(
color: _kDmRecipientHeaderColor,
child: const Text("Direct message", // TODO DM recipient headers
style: TextStyle(color: Colors.white)))));
}
}

Expand Down

0 comments on commit f7feabf

Please sign in to comment.