status/volume: Ignore capitalization for headphone detection

When we can't detect a headphone by form factor, we do a string
match on the port name. A match on 'Headphone' isn't less likely
to be valid than a match on 'headphone', so make sure we ignore
capitalization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2691>
This commit is contained in:
Florian Müllner 2023-03-12 22:55:45 +01:00 committed by Marge Bot
parent 2eb3aff92c
commit b8dcf85cc8

View File

@ -319,7 +319,7 @@ class OutputStreamSlider extends StreamSlider {
// of different identifiers for headphones, and I could // of different identifiers for headphones, and I could
// not find the complete list // not find the complete list
if (sink.get_ports().length > 0) if (sink.get_ports().length > 0)
return sink.get_port().port.includes('headphone'); return sink.get_port().port.toLowerCase().includes('headphone');
return false; return false;
} }