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: Don't zoom out unless already zoomed in for that view.

Evy Kassirer1b8d1be99fe0
diff --git a/web/src/pm_list.ts b/web/src/pm_list.ts
index 993a2810b49..f8ce418cdb1 100644
--- a/web/src/pm_list.ts
+++ b/web/src/pm_list.ts
@@ -328,6 +328,9 @@ function zoom_in(): void {
}
function zoom_out(): void {
+ if (!zoomed) {
+ return;
+ }
zoomed = false;
ui_util.enable_left_sidebar_search();
clear_search();
diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts
index cd781f07b53..57dd2b9c3be 100644
--- a/web/src/topic_list.ts
+++ b/web/src/topic_list.ts
@@ -68,12 +68,18 @@ export function clear(): void {
}
export function close(): void {
- zoomed = false;
clear();
- ui_util.enable_left_sidebar_search();
+ if (zoomed) {
+ zoomed = false;
+ ui_util.enable_left_sidebar_search();
+ }
}
export function zoom_out(): void {
+ if (!zoomed) {
+ return;
+ }
+
zoomed = false;
ui_util.enable_left_sidebar_search();