mirror of https://github.com/zulip/zulip.git
popover: Remove unused code.
exclude_tippy_instance was not being used correctly since it was never defined as an `opts` property for `hide_all_except_sidebars`. Everything seems to be working fine without this. I recall that popovers seems to be hidden before they were displayed for which this was required but it doesn't seem to be needed anymore.
This commit is contained in:
parent
13b478f81f
commit
96a93339cd
|
@ -86,7 +86,7 @@ function on_show_prep(instance) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
instance.hide();
|
instance.hide();
|
||||||
});
|
});
|
||||||
popovers.hide_all_except_sidebars(instance);
|
popovers.hide_all_except_sidebars();
|
||||||
}
|
}
|
||||||
|
|
||||||
function tippy_no_propagation(target, popover_props) {
|
function tippy_no_propagation(target, popover_props) {
|
||||||
|
@ -214,7 +214,7 @@ export function initialize() {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
compose_control_buttons_popover_instance = instance;
|
compose_control_buttons_popover_instance = instance;
|
||||||
popovers.hide_all_except_sidebars(instance);
|
popovers.hide_all_except_sidebars();
|
||||||
},
|
},
|
||||||
onHidden(instance) {
|
onHidden(instance) {
|
||||||
instance.destroy();
|
instance.destroy();
|
||||||
|
|
|
@ -1136,8 +1136,6 @@ export function hide_all_except_sidebars(opts) {
|
||||||
if (!opts || !opts.not_hide_tippy_instances) {
|
if (!opts || !opts.not_hide_tippy_instances) {
|
||||||
// hideAll hides all tippy instances (tooltips and popovers).
|
// hideAll hides all tippy instances (tooltips and popovers).
|
||||||
hideAll();
|
hideAll();
|
||||||
} else if (opts.exclude_tippy_instance) {
|
|
||||||
hideAll({exclude: opts.exclude_tippy_instance});
|
|
||||||
}
|
}
|
||||||
emoji_picker.hide_emoji_popover();
|
emoji_picker.hide_emoji_popover();
|
||||||
giphy.hide_giphy_popover();
|
giphy.hide_giphy_popover();
|
||||||
|
@ -1164,7 +1162,6 @@ export function hide_all(not_hide_tippy_instances) {
|
||||||
hide_userlist_sidebar();
|
hide_userlist_sidebar();
|
||||||
stream_popover.hide_streamlist_sidebar();
|
stream_popover.hide_streamlist_sidebar();
|
||||||
hide_all_except_sidebars({
|
hide_all_except_sidebars({
|
||||||
exclude_tippy_instance: undefined,
|
|
||||||
not_hide_tippy_instances,
|
not_hide_tippy_instances,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue