Skip to content

Commit

Permalink
fix: fixed switching sensor in the settings (#1923)
Browse files Browse the repository at this point in the history
  • Loading branch information
exelban committed May 2, 2024
1 parent 7ee3d96 commit 499a30f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Modules/Sensors/settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit 499a30f

Please sign in to comment.