mirror of https://github.com/zulip/zulip.git
select_message: Fall back to the last, not first, message
This seems more likely to be what people want when e.g. viewing all huddles. Later we can get more clever and select the nearest huddle, or something. (imported from commit 8ec1aa02c050dd25eb868b1e317d114743525c7b)
This commit is contained in:
parent
37ac9d2a91
commit
e7746e97e8
|
@ -240,9 +240,9 @@ function select_message(next_message, opts) {
|
|||
next_message = rows.next_visible(next_message);
|
||||
}
|
||||
|
||||
/* Fall back to the first visible message. */
|
||||
/* Fall back to the last visible message. */
|
||||
if (next_message.length === 0) {
|
||||
next_message = rows.first_visible();
|
||||
next_message = rows.last_visible();
|
||||
if (next_message.length === 0) {
|
||||
// There are no messages!
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue