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.

pm_list: Cut import of topic_zoom.

Anders Kaseorga43ea3efaab2
diff --git a/web/src/click_handlers.js b/web/src/click_handlers.js
index c08c774ae86..8d7496ebc57 100644
--- a/web/src/click_handlers.js
+++ b/web/src/click_handlers.js
@@ -41,6 +41,7 @@ import * as starred_messages_ui from "./starred_messages_ui";
import * as stream_list from "./stream_list";
import * as stream_popover from "./stream_popover";
import * as topic_list from "./topic_list";
+import * as topic_zoom from "./topic_zoom";
import * as ui_util from "./ui_util";
import {parse_html} from "./ui_util";
import * as user_topics from "./user_topics";
@@ -729,6 +730,10 @@ export function initialize() {
);
const scroll_position = $left_sidebar_scrollbar.scrollTop();
+ if (topic_zoom.is_zoomed_in()) {
+ topic_zoom.zoom_out();
+ }
+
// This next bit of logic is a bit subtle; this header
// button scrolls to the top of the direct messages
// section is uncollapsed but out of view; otherwise, we
diff --git a/web/src/pm_list.js b/web/src/pm_list.js
index 648e3569f64..e0c07bc432e 100644
--- a/web/src/pm_list.js
+++ b/web/src/pm_list.js
@@ -5,7 +5,6 @@ import * as pm_list_data from "./pm_list_data";
import * as pm_list_dom from "./pm_list_dom";
import * as resize from "./resize";
import * as scroll_util from "./scroll_util";
-import * as topic_zoom from "./topic_zoom";
import * as ui_util from "./ui_util";
import * as vdom from "./vdom";
@@ -100,11 +99,6 @@ export function update_private_messages() {
}
export function expand() {
- // Only one thing can be zoomed at a time.
- if (topic_zoom.is_zoomed_in()) {
- topic_zoom.zoom_out();
- }
-
private_messages_collapsed = false;
$("#toggle_private_messages_section_icon").addClass("fa-caret-down");
@@ -193,9 +187,6 @@ export function toggle_private_messages_section() {
function zoom_in() {
zoomed = true;
- if (topic_zoom.is_zoomed_in()) {
- topic_zoom.zoom_out();
- }
update_private_messages();
$(".private_messages_container").removeClass("zoom-out").addClass("zoom-in");
$("#streams_list").hide();