message_scroll: Use fadeOut effect to hide the scroll to bottom button.

We use `fadeOut` effect to hide the scroll to bottom button more
widely. We already use `fadeIn` effect to display the button
every time.

We deliberately don't use the `fadeOut` effect when doing
`make_compose_box_full_size` to avoid any button overlap with
compose for a short time.
This commit is contained in:
Aman Agrawal 2022-03-20 17:15:20 +00:00 committed by Tim Abbott
parent c5bb9cb08a
commit 8d78f356e6
1 changed files with 3 additions and 3 deletions

View File

@ -137,7 +137,7 @@ export function hide_scroll_to_bottom() {
if (message_viewport.bottom_message_visible() || message_lists.current.empty()) {
// If last message is visible, just hide the
// scroll to bottom button.
$show_scroll_to_bottom_button.hide();
$show_scroll_to_bottom_button.fadeOut(500);
return;
}
@ -170,9 +170,9 @@ $(document).on("keydown", (e) => {
return;
}
// Instantly hide scroll to bottom button on any keypress.
// Hide scroll to bottom button on any keypress.
// Keyboard users are very less likely to use this button.
$("#scroll-to-bottom-button-container").hide();
$("#scroll-to-bottom-button-container").fadeOut(500);
});
export function is_actively_scrolling() {