mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
pm_list: Cut import of topic_zoom.
topic_zoom.is_zoomed_in() can’t be true in pm_list.zoom_in, because “more conversations” would not be visible in that state. And it can’t be true when pm_list.handle_narrow_activated calls pm_list.expand, because “more topics” would not be visible in an all-DM view. So the only non-inert call is via click_handlers; move it there. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
564e91f3a8
commit
a43ea3efaa
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user