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.

channel_folders_popover: Track folder actions popover instance.

Evy Kassirer1f00386c66d4
diff --git a/web/src/channel_folders_popover.ts b/web/src/channel_folders_popover.ts
index 3b8145c6f8a..126083a736d 100644
--- a/web/src/channel_folders_popover.ts
+++ b/web/src/channel_folders_popover.ts
@@ -219,6 +219,7 @@ export function initialize(): void {
...popover_menus.left_sidebar_tippy_options,
theme: "popover-menu",
onMount(instance) {
+ popover_menus.popover_instances.folder_actions = instance;
const $popper = $(instance.popper);
assert(instance.reference instanceof HTMLElement);
ui_util.show_left_sidebar_menu_icon(instance.reference);
@@ -248,6 +249,7 @@ export function initialize(): void {
onHidden(instance) {
ui_util.hide_left_sidebar_menu_icon();
instance.destroy();
+ popover_menus.popover_instances.folder_actions = null;
},
});
},
diff --git a/web/src/popover_menus.ts b/web/src/popover_menus.ts
index 86a628a2ffe..71569c09007 100644
--- a/web/src/popover_menus.ts
+++ b/web/src/popover_menus.ts
@@ -37,6 +37,7 @@ type PopoverName =
| "color_picker_popover"
| "show_folders_sidebar"
| "show_folders_inbox"
+ | "folder_actions"
| "send_later_options";
export const popover_instances: Record<PopoverName, tippy.Instance | null> = {
@@ -62,6 +63,7 @@ export const popover_instances: Record<PopoverName, tippy.Instance | null> = {
color_picker_popover: null,
show_folders_sidebar: null,
show_folders_inbox: null,
+ folder_actions: null,
send_later_options: null,
};