mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed switching sensor in the settings (#1923)
This commit is contained in:
@@ -120,10 +120,12 @@ internal class Settings: NSStackView, Settings_v {
|
||||
}
|
||||
groups.forEach { (group: SensorGroup) in
|
||||
filtered.filter{ $0.group == group }.forEach { (s: Sensor_p) in
|
||||
section.add(PreferencesRow(localizedString(s.name), component: switchView(
|
||||
let btn = switchView(
|
||||
action: #selector(self.toggleSensor),
|
||||
state: s.state
|
||||
)))
|
||||
)
|
||||
btn.identifier = NSUserInterfaceItemIdentifier(rawValue: s.key)
|
||||
section.add(PreferencesRow(localizedString(s.name), component: btn))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user