mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
refactor: Move simplebar helper functions from ui to scroll_util.
This commit eliminates the `ui.js` module from the codebase by moving all simplebar helper functions to the `scroll_util` module.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import $ from "jquery";
|
||||
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as ui from "./ui";
|
||||
import * as scroll_util from "./scroll_util";
|
||||
|
||||
const DEFAULTS = {
|
||||
INITIAL_RENDER_COUNT: 80,
|
||||
@@ -306,7 +306,7 @@ export function create($container, list, opts) {
|
||||
};
|
||||
|
||||
widget.set_up_event_handlers = function () {
|
||||
meta.$scroll_container = ui.get_scroll_element(opts.$simplebar_container);
|
||||
meta.$scroll_container = scroll_util.get_scroll_element(opts.$simplebar_container);
|
||||
|
||||
// on scroll of the nearest scrolling container, if it hits the bottom
|
||||
// of the container then fetch a new block of items and render them.
|
||||
|
||||
Reference in New Issue
Block a user