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.

left_sidebar: Always show `VIEWS` in expanded state for spectators.

Aman Agrawal6c4af3478f9b
diff --git a/web/src/left_sidebar_navigation_area.js b/web/src/left_sidebar_navigation_area.js
index 7f961bb5696..32b432d1d9c 100644
--- a/web/src/left_sidebar_navigation_area.js
+++ b/web/src/left_sidebar_navigation_area.js
@@ -1,6 +1,7 @@
import $ from "jquery";
import {localstorage} from "./localstorage";
+import {page_params} from "./page_params";
import * as resize from "./resize";
import * as scheduled_messages from "./scheduled_messages";
import * as settings_config from "./settings_config";
@@ -17,6 +18,11 @@ const STATES = {
};
function restore_views_state() {
+ if (page_params.is_spectator) {
+ // Spectators should always see the expanded view.
+ return;
+ }
+
const views_state = ls.get(ls_key);
// Expanded state is default, so we only need to toggle if the state is condensed.
if (views_state === STATES.CONDENSED) {