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:
Lalit
2023-04-25 21:31:02 +05:30
committed by Tim Abbott
parent b55ee161e2
commit b9223088f3
33 changed files with 140 additions and 127 deletions

View File

@@ -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.