mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 22:19:48 +00:00
refactor: Early-exit in message_scroll.scroll_finished.
This is just cosmetic to flatten the function a bit.
This commit is contained in:
@@ -28,13 +28,18 @@ exports.actively_scrolling = function () {
|
||||
exports.scroll_finished = function () {
|
||||
actively_scrolling = false;
|
||||
|
||||
if ($('#home').hasClass('active')) {
|
||||
if (!$('#home').hasClass('active')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pointer.suppress_scroll_pointer_update) {
|
||||
message_viewport.keep_pointer_in_view();
|
||||
} else {
|
||||
pointer.suppress_scroll_pointer_update = false;
|
||||
}
|
||||
|
||||
floating_recipient_bar.update();
|
||||
|
||||
if (message_viewport.scrollTop() === 0) {
|
||||
message_fetch.load_more_messages({
|
||||
msg_list: current_msg_list,
|
||||
@@ -48,7 +53,6 @@ exports.scroll_finished = function () {
|
||||
// unread_ops.process_visible will update necessary
|
||||
// data structures and DOM elements.
|
||||
setTimeout(unread_ops.process_visible, 0);
|
||||
}
|
||||
};
|
||||
|
||||
var scroll_timer;
|
||||
|
||||
Reference in New Issue
Block a user