mirror of https://github.com/zulip/zulip.git
Refactor perfect-scrollbar: Call ui methods in stream_list.js.
This commit is contained in:
parent
26eb60b382
commit
591624972e
|
@ -240,9 +240,13 @@ function initialize_stream_data() {
|
|||
stream_list.scroll_element_into_container = noop;
|
||||
|
||||
var scrollbar_updated = false;
|
||||
$.stub_selector("#stream-filters-container", {
|
||||
perfectScrollbar: function () { scrollbar_updated = true; },
|
||||
|
||||
set_global('ui', {
|
||||
update_scrollbar: function () {scrollbar_updated = true;},
|
||||
});
|
||||
ui.update_scrollbar(
|
||||
$.stub_selector("#stream-filters-container")
|
||||
);
|
||||
|
||||
assert(!$('<devel sidebar row html>').hasClass('active-filter'));
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ exports.handle_narrow_activated = function (filter) {
|
|||
exports.scroll_stream_into_view(stream_li);
|
||||
}
|
||||
// Update scrollbar size.
|
||||
$("#stream-filters-container").perfectScrollbar("update");
|
||||
ui.update_scrollbar($("#stream-filters-container"));
|
||||
};
|
||||
|
||||
exports.handle_narrow_deactivated = function () {
|
||||
|
|
Loading…
Reference in New Issue