Skip to content

Commit 80b83e8

Browse files
sm-sayedignprice
authored andcommitted
msglist: Pass last message id to topic action sheet instead of first
In the next commit(s), when creating topic permalinks, we try to use max message id of the topic, if possible. If we cannot find the max message id, then I think better to use a message id near to max message id. Related CZO discussions: https://chat.zulip.org/#narrow/channel/101-design/topic/redirects.20from.20near.20links/near/1460694 https://chat.zulip.org/#narrow/channel/101-design/topic/redirects.20from.20near.20links/near/1774403
1 parent 373cfb7 commit 80b83e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/widgets/message_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ class MessageListAppBarTitle extends StatelessWidget {
584584
behavior: HitTestBehavior.translucent,
585585
onLongPress: () {
586586
final someMessage = MessageListPage.ancestorOf(context)
587-
.model?.messages.firstOrNull;
587+
.model?.messages.lastOrNull;
588588
// If someMessage is null, the topic action sheet won't have a
589589
// resolve/unresolve button. That seems OK; in that case we're
590590
// either still fetching messages (and the user can reopen the

0 commit comments

Comments
 (0)