status/volume: Small cleanup

There is no point in splitting out a function that has one caller
and sets a single property.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2380>
This commit is contained in:
Florian Müllner 2022-07-15 18:15:13 +02:00
parent d80a7224cd
commit a768efad06

View File

@ -254,19 +254,16 @@ var OutputStreamSlider = class extends StreamSlider {
return false; return false;
} }
_updateSliderIcon() { _portChanged() {
const hasHeadphones = this._findHeadphones(this._stream);
if (hasHeadphones === this._hasHeadphones)
return;
this._hasHeadphones = hasHeadphones;
this._icon.icon_name = this._hasHeadphones this._icon.icon_name = this._hasHeadphones
? 'audio-headphones-symbolic' ? 'audio-headphones-symbolic'
: 'audio-speakers-symbolic'; : 'audio-speakers-symbolic';
} }
_portChanged() {
let hasHeadphones = this._findHeadphones(this._stream);
if (hasHeadphones != this._hasHeadphones) {
this._hasHeadphones = hasHeadphones;
this._updateSliderIcon();
}
}
}; };
var InputStreamSlider = class extends StreamSlider { var InputStreamSlider = class extends StreamSlider {