left-sidebar: Remove add-streams option out of scrollbar.

This commit removes the option to add more streams out of scrollbar
as it is not visible on mobile devices or organizations with large number of
streams until scrolled down.
This commit is contained in:
Gaurav Pandey
2021-03-01 11:03:11 +05:30
committed by Tim Abbott
parent 5192dab31d
commit 7ddf6435a9
3 changed files with 9 additions and 8 deletions

View File

@@ -40,6 +40,7 @@ function get_new_heights() {
const viewport_height = message_viewport.height();
const top_navbar_height = $("#top_navbar").safeOuterHeight(true);
const invite_user_link_height = $("#invite-user-link").safeOuterHeight(true) || 0;
const add_streams_link_height = $("#add-stream-link").safeOuterHeight(true) || 0;
res.bottom_whitespace_height = viewport_height * 0.4;
@@ -51,7 +52,8 @@ function get_new_heights() {
Number.parseInt($(".narrows_panel").css("marginTop"), 10) -
Number.parseInt($(".narrows_panel").css("marginBottom"), 10) -
$("#global_filters").safeOuterHeight(true) -
$("#streams_header").safeOuterHeight(true);
$("#streams_header").safeOuterHeight(true) -
add_streams_link_height;
// Don't let us crush the stream sidebar completely out of view
res.stream_filters_max_height = Math.max(80, res.stream_filters_max_height);