status/volume: Clear device menus when unsetting stream

Otherwise we end up accumulating devices when pipewire crashes or
is restarted.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6142

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2558>
This commit is contained in:
Florian Müllner 2022-11-25 17:08:51 +01:00 committed by Marge Bot
parent e752aa75fc
commit 1b62b7ea0a

View File

@ -83,6 +83,8 @@ const StreamSlider = GObject.registerClass({
this._connectStream(this._stream); this._connectStream(this._stream);
this._updateVolume(); this._updateVolume();
} else { } else {
this._deviceSection.removeAll();
this._deviceItems.clear();
this.emit('stream-updated'); this.emit('stream-updated');
} }