Closed rambonette closed 1 year ago
Looks good! One concern I have is that every change to the settings means a write to the flash storage, and doing that every time the flashlight is turned on or off might not be great for the lifespan of the storage. Maybe it could instead be implemented as an extra check whether the flashlight app is running before sending a notification.
Thanks @FintasticMan !
Looks good! One concern I have is that every change to the settings means a write to the flash storage, and doing that every time the flashlight is turned on or off might not be great for the lifespan of the storage. Maybe it could instead be implemented as an extra check whether the flashlight app is running before sending a notification.
That's actually a very smart idea. I'll definitely try this reverse approach!
Considering the before animation is outdated, I think the current behaviour is fine. We shouldn't make unnecessary exceptions for showing notifications, and by having the flashlight turn off, you won't get blinded by the light when you close the notification.
Premise: I don't know if this is the right approach to accomplish this.
Quick (possible) solution to this #1522 issue/enhancement. Made a quick before/after video comparison to demonstrate the solution.
Before:
After:
The basic strategy here is to check if
settingsController.GetNotificationStatus()
isOn
when Flashlight is toggled, then act accordingly keeping track of the previous notification status withbool notificationsStatus
to be able to revert the setting once Flashlight is off.