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:
Aman Agrawal 2022-11-30 13:09:42 +00:00 committed by Tim Abbott
parent 13b478f81f
commit 96a93339cd
2 changed files with 2 additions and 5 deletions

View File

@ -86,7 +86,7 @@ function on_show_prep(instance) {
e.stopPropagation();
instance.hide();
});
popovers.hide_all_except_sidebars(instance);
popovers.hide_all_except_sidebars();
}
function tippy_no_propagation(target, popover_props) {
@ -214,7 +214,7 @@ export function initialize() {
),
);
compose_control_buttons_popover_instance = instance;
popovers.hide_all_except_sidebars(instance);
popovers.hide_all_except_sidebars();
},
onHidden(instance) {
instance.destroy();

View File

@ -1136,8 +1136,6 @@ export function hide_all_except_sidebars(opts) {
if (!opts || !opts.not_hide_tippy_instances) {
// hideAll hides all tippy instances (tooltips and popovers).
hideAll();
} else if (opts.exclude_tippy_instance) {
hideAll({exclude: opts.exclude_tippy_instance});
}
emoji_picker.hide_emoji_popover();
giphy.hide_giphy_popover();
@ -1164,7 +1162,6 @@ export function hide_all(not_hide_tippy_instances) {
hide_userlist_sidebar();
stream_popover.hide_streamlist_sidebar();
hide_all_except_sidebars({
exclude_tippy_instance: undefined,
not_hide_tippy_instances,
});
}