mirror of https://github.com/zulip/zulip.git
DRY up check for feature_flags.left_side_userlist.
(imported from commit d7cbb1eee0e83ddf811451e10dd6dcd03c86ffd0)
This commit is contained in:
parent
b53513a5e7
commit
009d1ed88a
|
@ -491,7 +491,8 @@ exports.resize_page_components = function () {
|
||||||
var h;
|
var h;
|
||||||
var sidebar;
|
var sidebar;
|
||||||
|
|
||||||
if (viewport.width() < 975 && feature_flags.left_side_userlist && !narrow_window) {
|
if (feature_flags.left_side_userlist) {
|
||||||
|
if (viewport.width() < 975 && !narrow_window) {
|
||||||
narrow_window = true;
|
narrow_window = true;
|
||||||
popovers.set_userlist_placement("left");
|
popovers.set_userlist_placement("left");
|
||||||
sidebar = $(".bottom_sidebar").expectOne();
|
sidebar = $(".bottom_sidebar").expectOne();
|
||||||
|
@ -503,7 +504,7 @@ exports.resize_page_components = function () {
|
||||||
$("#userlist-toggle").css("display", "none");
|
$("#userlist-toggle").css("display", "none");
|
||||||
$("#invite-user-link").hide();
|
$("#invite-user-link").hide();
|
||||||
}
|
}
|
||||||
else if (viewport.width() > 975 && feature_flags.left_side_userlist && narrow_window) {
|
else if (viewport.width() > 975 && narrow_window) {
|
||||||
narrow_window = false;
|
narrow_window = false;
|
||||||
popovers.set_userlist_placement("right");
|
popovers.set_userlist_placement("right");
|
||||||
sidebar = $("#right-sidebar").expectOne();
|
sidebar = $("#right-sidebar").expectOne();
|
||||||
|
@ -514,7 +515,7 @@ exports.resize_page_components = function () {
|
||||||
$("#userlist-toggle").css("display", '');
|
$("#userlist-toggle").css("display", '');
|
||||||
$("#invite-user-link").show();
|
$("#invite-user-link").show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h = narrow_window ? left_userlist_get_new_heights() : get_new_heights();
|
h = narrow_window ? left_userlist_get_new_heights() : get_new_heights();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue