left-sidebar: Combine two selections for `#stream-filters-container` to one.

This combines two different selections of the
`#stream-filters-container` into one chained selection and writes a
comment on how it is possible due to the return value of `.css`.
This commit is contained in:
Brock Whittaker 2017-09-26 11:34:34 -07:00 committed by Tim Abbott
parent c2290b0328
commit 38b3eeb332
1 changed files with 4 additions and 2 deletions

View File

@ -254,11 +254,13 @@ exports.resize_page_components = function () {
h = narrow_window ? left_userlist_get_new_heights() : get_new_heights();
exports.resize_bottom_whitespace(h);
$("#stream-filters-container").css('max-height', h.stream_filters_max_height);
$("#user_presences").css('max-height', h.user_presences_max_height);
$("#group-pms").css('max-height', h.group_pms_max_height);
$('#stream-filters-container').perfectScrollbar('update');
$("#stream-filters-container")
.css('max-height', h.stream_filters_max_height)
// the `.css` method returns `$this`, so we can chain `perfectScrollbar`.
.perfectScrollbar('update');
};
var _old_width = $(window).width();