code review

This commit is contained in:
Kyle Matthew Hedden 2020-05-12 17:45:17 -04:00
parent 233a0ae71b
commit 5996f26ae1

View File

@ -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)