Fix to list height computation

(imported from commit c43b07fa25f41146c8410bc41d90278c1a90a34b)
This commit is contained in:
Allen Rabinovich
2013-09-18 15:17:14 -07:00
parent 8e6c7146f4
commit 9ed05a1f85
2 changed files with 6 additions and 3 deletions

View File

@@ -144,6 +144,7 @@ exports.show_userlist_sidebar = function () {
exports.show_streamlist_sidebar = function () {
$(".app-main .column-left").addClass("expanded");
ui.resize_page_components();
};
var current_stream_sidebar_elem;

View File

@@ -388,10 +388,13 @@ function left_userlist_get_new_heights() {
- share_the_love_height
- 15;
res.stream_filters_max_height = Math.max(40, res.total_leftlist_height / 2);
res.user_presences_max_height = Math.max(40, res.total_leftlist_height / 2);
if (res.stream_filters_max_height > stream_filters_real_height) {
res.stream_filters_max_height = stream_filters_real_height;
res.user_presences_max_height = Math.max(40, res.total_leftlist_height
@@ -447,11 +450,10 @@ exports.resize_page_components = function () {
$("#bottom_whitespace").height(h.bottom_whitespace_height);
$("#stream_filters").css('max-height', h.stream_filters_max_height);
$("#user_presences").css('max-height', h.user_presences_max_height);
popovers.hide_all();
};
function resizehandler(e) {
popovers.hide_all();
exports.resize_page_components();
// This function might run onReady (if we're in a narrow window),