mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Fix to list height computation
(imported from commit c43b07fa25f41146c8410bc41d90278c1a90a34b)
This commit is contained in:
@@ -144,6 +144,7 @@ exports.show_userlist_sidebar = function () {
|
|||||||
|
|
||||||
exports.show_streamlist_sidebar = function () {
|
exports.show_streamlist_sidebar = function () {
|
||||||
$(".app-main .column-left").addClass("expanded");
|
$(".app-main .column-left").addClass("expanded");
|
||||||
|
ui.resize_page_components();
|
||||||
};
|
};
|
||||||
|
|
||||||
var current_stream_sidebar_elem;
|
var current_stream_sidebar_elem;
|
||||||
|
|||||||
@@ -388,10 +388,13 @@ function left_userlist_get_new_heights() {
|
|||||||
- share_the_love_height
|
- share_the_love_height
|
||||||
- 15;
|
- 15;
|
||||||
|
|
||||||
|
|
||||||
res.stream_filters_max_height = Math.max(40, res.total_leftlist_height / 2);
|
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);
|
res.user_presences_max_height = Math.max(40, res.total_leftlist_height / 2);
|
||||||
|
|
||||||
|
|
||||||
if (res.stream_filters_max_height > stream_filters_real_height) {
|
if (res.stream_filters_max_height > stream_filters_real_height) {
|
||||||
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
|
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);
|
$("#bottom_whitespace").height(h.bottom_whitespace_height);
|
||||||
$("#stream_filters").css('max-height', h.stream_filters_max_height);
|
$("#stream_filters").css('max-height', h.stream_filters_max_height);
|
||||||
$("#user_presences").css('max-height', h.user_presences_max_height);
|
$("#user_presences").css('max-height', h.user_presences_max_height);
|
||||||
|
|
||||||
popovers.hide_all();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function resizehandler(e) {
|
function resizehandler(e) {
|
||||||
|
popovers.hide_all();
|
||||||
exports.resize_page_components();
|
exports.resize_page_components();
|
||||||
|
|
||||||
// This function might run onReady (if we're in a narrow window),
|
// This function might run onReady (if we're in a narrow window),
|
||||||
|
|||||||
Reference in New Issue
Block a user