zulip/web/src/message_scroll_state.ts
Anders Kaseorg 457544e0d2 message_scroll: Move state flags to new module message_scroll_state.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-02 17:37:56 -07:00

16 lines
578 B
TypeScript

// Tracks whether the next scroll that will complete is initiated by
// code, not the user, and thus should avoid moving the selected
// message.
export let update_selection_on_next_scroll = true;
export function set_update_selection_on_next_scroll(value: boolean): void {
update_selection_on_next_scroll = value;
}
// Whether a keyboard shortcut is triggering a message feed scroll event.
export let keyboard_triggered_current_scroll = false;
export function set_keyboard_triggered_current_scroll(value: boolean): void {
keyboard_triggered_current_scroll = value;
}