Fix: Keep hidden items hidden

This commit is contained in:
Julian 2023-02-05 18:18:45 +01:00
parent 39face9957
commit 470ebf761d
Signed by: julian
GPG Key ID: 094C2AC34192FA11

View File

@ -124,6 +124,9 @@ class Extension {
// Get the indicator container associated with the current role.
const associatedIndicatorContainer = Main.panel.statusArea[role].container;
// Save whether or not the indicator container is visible.
const isVisible = associatedIndicatorContainer.visible;
associatedIndicatorContainer.get_parent().remove_child(associatedIndicatorContainer);
if (box === "right") {
// If the target panel box is the right panel box, insert the
@ -142,6 +145,11 @@ class Extension {
} else {
panelBox.insert_child_at_index(associatedIndicatorContainer, i);
}
// Hide the indicator container again, if it wasn't visible.
if (!isVisible) {
associatedIndicatorContainer.hide();
}
}
// To handle the case, where the box order got set to a permutation
// of an outdated box order, it would be wise, if the caller updated the