mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
fix: fixed disks duplicating on startup (could also happen with Bluetooth and GPU devices)
This commit is contained in:
@@ -49,7 +49,7 @@ internal class Popup: NSStackView, Popup_p {
|
||||
}
|
||||
|
||||
list.reversed().forEach { (ble: BLEDevice) in
|
||||
if let view = views.first(where: { $0.address == ble.address }) {
|
||||
if let view = self.subviews.filter({ $0 is BLEView }).map({ $0 as! BLEView }).first(where: { $0.address == ble.address }) {
|
||||
view.update(ble.batteryLevel)
|
||||
} else {
|
||||
self.addArrangedSubview(BLEView(
|
||||
|
||||
Reference in New Issue
Block a user