File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ pub enum StaticIcon {
5656 Ethernet ,
5757 Vpn ,
5858 Bluetooth ,
59+ BluetoothConnected ,
5960 PowerSaver ,
6061 Balanced ,
6162 Performance ,
@@ -154,6 +155,7 @@ impl Icon for StaticIcon {
154155 StaticIcon :: Ethernet => "\u{f0200} " ,
155156 StaticIcon :: Vpn => "\u{f0582} " ,
156157 StaticIcon :: Bluetooth => "\u{f00af} " ,
158+ StaticIcon :: BluetoothConnected => "\u{f00b1} " ,
157159 StaticIcon :: PowerSaver => "\u{f0f86} " ,
158160 StaticIcon :: Balanced => "\u{f0f85} " ,
159161 StaticIcon :: Performance => "\u{f04c5} " ,
Original file line number Diff line number Diff line change @@ -413,9 +413,13 @@ impl BluetoothSettings {
413413 ) -> Option < Element < ' a , Message > > {
414414 if let Some ( service) = & self . service
415415 && service. state == BluetoothState :: Active
416- && !service. devices . is_empty ( )
417416 {
418- return Some ( icon ( StaticIcon :: Bluetooth ) . into ( ) ) ;
417+ let connected_count = service. devices . iter ( ) . filter ( |d| d. connected ) . count ( ) ;
418+ if connected_count > 0 {
419+ return Some ( icon ( StaticIcon :: BluetoothConnected ) . into ( ) ) ;
420+ } else {
421+ return Some ( icon ( StaticIcon :: Bluetooth ) . into ( ) ) ;
422+ }
419423 }
420424 None
421425 }
You can’t perform that action at this time.
0 commit comments