From 7b77e9e44599a1c1a697b590a2d28078530d0b19 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Fri, 26 Aug 2022 11:34:00 +0200 Subject: [PATCH] fix: disable fan reset if the fan is in the automatic mode and the app does not have permissions (#1053) --- Modules/Sensors/popup.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/Sensors/popup.swift b/Modules/Sensors/popup.swift index f45fc3a9..eca637b5 100644 --- a/Modules/Sensors/popup.swift +++ b/Modules/Sensors/popup.swift @@ -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)