Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ui_init: Hide sidebar when clicking a topic link on small devices.

ubaidrmna9fa5b66a2b1
diff --git a/web/src/ui_init.js b/web/src/ui_init.js
index d78c85c2bed..6eb49afbc44 100644
--- a/web/src/ui_init.js
+++ b/web/src/ui_init.js
@@ -686,6 +686,15 @@ export function initialize_everything(state_data) {
}
message_view.show(narrow, {trigger: "sidebar"});
+
+ if (sidebar_ui.left_sidebar_expanded_as_overlay) {
+ // If the left sidebar is drawn over the center pane,
+ // hide it so that the user can actually see the
+ // topic. We don't need to also hide the user list
+ // sidebar, since its own click-outside handler will
+ // hide it.
+ sidebar_ui.hide_streamlist_sidebar();
+ }
},
});
drafts.initialize_ui();