mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
message_list: Extract visibly_empty helper method.
This function will allow us to adjust the codebase to write what it means semantically -- whether a check is for the message list being visibly empty, or completely empty. In this commit, we leave the .empty() method incorrect, because several other adjustments need to be made atomically with fixing it.
This commit is contained in:
@@ -139,7 +139,7 @@ export function hide_top_of_narrow_notices() {
|
||||
let hide_scroll_to_bottom_timer;
|
||||
export function hide_scroll_to_bottom() {
|
||||
const $show_scroll_to_bottom_button = $("#scroll-to-bottom-button-container");
|
||||
if (message_viewport.bottom_message_visible() || message_lists.current.empty()) {
|
||||
if (message_viewport.bottom_message_visible() || message_lists.current.visibly_empty()) {
|
||||
// If last message is visible, just hide the
|
||||
// scroll to bottom button.
|
||||
$show_scroll_to_bottom_button.removeClass("show");
|
||||
|
||||
Reference in New Issue
Block a user