diff --git a/lib/controls/timeline/flattened_tree_entry_control.dart b/lib/controls/timeline/flattened_tree_entry_control.dart index de034c6..19c9e5f 100644 --- a/lib/controls/timeline/flattened_tree_entry_control.dart +++ b/lib/controls/timeline/flattened_tree_entry_control.dart @@ -122,7 +122,13 @@ class _StatusControlState extends State { top: otherPadding, bottom: otherPadding, ), - child: bodyCard, + child: GestureDetector( + onTap: () { + if (widget.showStatusOpenButton) { + _goToPostView(); + } + }, + child: bodyCard), ); } @@ -265,6 +271,10 @@ class _StatusControlState extends State { copyText, ]; + if (options.first == divider) { + options.removeAt(0); + } + final entry = widget.originalItem.timelineEntry; return PopupMenuButton(onSelected: (menuOption) async { @@ -274,8 +284,7 @@ class _StatusControlState extends State { switch (menuOption) { case goToPost: - context.push( - '/post/view/${item.timelineEntry.id}/${item.timelineEntry.id}'); + _goToPostView(); break; case editStatus: if (item.timelineEntry.parentId.isEmpty) { @@ -361,4 +370,9 @@ class _StatusControlState extends State { } setState(() {}); } + + void _goToPostView() { + context + .push('/post/view/${item.timelineEntry.id}/${item.timelineEntry.id}'); + } }