diff --git a/MVMCoreUI/Behaviors/ScreenBrightnessModifierBehavior.swift b/MVMCoreUI/Behaviors/ScreenBrightnessModifierBehavior.swift index 03464841..b6ea9f6d 100644 --- a/MVMCoreUI/Behaviors/ScreenBrightnessModifierBehavior.swift +++ b/MVMCoreUI/Behaviors/ScreenBrightnessModifierBehavior.swift @@ -27,7 +27,7 @@ public class ScreenBrightnessModifierBehavior: PageVisibilityBehavior { //MARK:- Behavior func changeScreenBrightness() { - if originalScreenBrightness != nil { return } + guard originalScreenBrightness == nil else { return } originalScreenBrightness = UIScreen.main.brightness UIScreen.main.brightness = screenBrightness NotificationCenter.default.addObserver(self, selector: #selector(willResignActive), name: UIApplication.willResignActiveNotification, object: nil)