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:
parent
2eb3aff92c
commit
b8dcf85cc8
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user