status/volume: Don't show OSD when initializing

The OSD should only be shown when switching to or from headphones,
not when initializing the volume indicator during startup.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8054
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3543>
This commit is contained in:
Florian Müllner 2024-11-11 21:14:42 +01:00 committed by Marge Bot
parent fbaead359a
commit 3d560909ea

View File

@ -344,8 +344,10 @@ class OutputStreamSlider extends StreamSlider {
if (hasHeadphones === this._hasHeadphones)
return;
const initializing = this._hasHeadphones === undefined;
this._hasHeadphones = hasHeadphones;
this._updateIcon();
if (!initializing)
this.showOSD();
}