Closed MagneFire closed 1 year ago
I very much like the goal of this PR but I think the logic should have been implemented differently. Let me try to explain the issue.
If the user sets a "day" watchface to A and a custom "night" watchface to B. And then, the user tries a few different "day" watchfaces (cycles through them in settings just to see what they are all like). If at any point the user picks up the B watchface as a day watchface, then the "custom watchface" setting will switch off by itself and the night watchfaces will start to automatically follow the day watchface. This results in a confusing UX since the user never unchecked the "custom watchface" switch, I would call it a bug.
If the "custom watchface" settings was remembered as an independent boolean settings, the launcher could just have the watchface be (isDay || !useCustomNightWatchface) ? dayWatchface : nightWatchface
. In settings, the custom nighstand watchface switch could just toggle useCustomNightWatchface
(feel free to name it differently) and this would result in a code that is a lot simpler (for example we don't need to leak nighstand implementation details into the day watchface selector page) and also fixes the bug described in the previous paragraph (if the user turns on "custom watchface", it stays on).
Excellent point! I'll adjust the logic to include said boolean. Initially I had the code setup this way as well, but for some reason I removed it. Thanks for this swift thinking!
Your suggestion is now implemented, thanks for the feedback! It now also relies on https://github.com/AsteroidOS/asteroid-launcher/pull/120.
Here's another scenario that doesn't seem to work quite right.
Initial settings - nightstand is ON, custom nightstand watchface is OFF.
In that last step, shouldn't it revert to using the daytime watchface?
Also at this point, if the user selects a different daytime watchface, the previously selected nightstand watchface remains unchanged.
Sorry, that's my error. I didn't notice that it also needed the commit from asteroid-launcher
. When I add that, it works just fine and as expected.
This follows up on the work done by @beroset in https://github.com/AsteroidOS/asteroid-settings/pull/59.
Essentially it adds support for using the same watchface for both nightstand mode and regular mode.
It implements a watchface tracking mode to ensure that the nightstand watchface matches the regular watchface whenever a different regular watchface is selected.