-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up StyleManager and respect dynamic type (#65)
* refactor StyleManager to explicit day/night styles As I understand it, we support 1 or 2 styles, but never more than 2. Keeping styles in a potentially empty/boundless Array made the internals of this class more complicated than necessary. This is intended to be a no-op from a user facing perspective, though the API has changed and there may have been times before where `refreshAppearence` was called twice, where now we'll only call it once. Also changed: - Deduped some of "apply appropriate style" logic. - Better labeled the intent of tunnel style logic. Previously it took me a while to understand why were canceling the timer in `applyStyleType` (we dont want to unset .night theme if we happen to be in a tunnel at sunrise) Note: there remains a pre-existing bug: `preferredContentSizeChanged` will not re-apply until the style changes for some other reasons (like entering a tunnel or time of day change). * clearer name * Navigation UI respects text size preference
- Loading branch information
1 parent
0d439d2
commit 5143a0f
Showing
5 changed files
with
115 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters