mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
Have home key go to actual first message in the list.
Before this, the home key would go to the first message in our render window. Now we go to the first message in our local list of messages. (Note that there may still be older messages, so it will still often take multiple uses of the home key to truly get to the top of your feed.)
This commit is contained in:
@@ -38,10 +38,9 @@ exports.down = function (with_centering) {
|
||||
|
||||
exports.to_home = function () {
|
||||
message_viewport.last_movement_direction = -1;
|
||||
var next_row = rows.first_visible(current_msg_list.selected_row());
|
||||
if (next_row.length !== 0) {
|
||||
go_to_row(next_row);
|
||||
}
|
||||
var first_id = current_msg_list.first().id;
|
||||
current_msg_list.select_id(first_id, {then_scroll: true,
|
||||
from_scroll: true});
|
||||
};
|
||||
|
||||
exports.to_end = function () {
|
||||
|
||||
Reference in New Issue
Block a user