fix: disable fan reset if the fan is in the automatic mode and the app does not have permissions (#1053)

This commit is contained in:
Serhiy Mytrovtsiy
2022-08-26 11:34:00 +02:00
parent 2871e98fda
commit 7b77e9e445

View File

@@ -629,6 +629,8 @@ internal class FanView: NSStackView {
}
@objc private func sleepListener(aNotification: NSNotification) {
guard SMCHelper.shared.checkRights() && self.fan.customMode != .automatic else { return }
self.willSleepMode = self.fan.customMode
self.willSleepSpeed = self.fan.customSpeed
SMCHelper.shared.setFanMode(fan.id, mode: FanMode.automatic.rawValue)