Skip to content
Discussion options

You must be logged in to vote

Governor and SwitchTriggerMode sit at different layers and don't need to carry the same information, that's why the split looks asymmetric.

Governor (AutoDarkModeLib/Enums.cs#L91) only picks which engine decides when to switch. There are exactly three governor implementations wired up from it, in GovernorModule.cs#L77-L89: TimeSwitchGovernor, NightLightGovernor, AmbientLightGovernor.

For Governor.Default, TimeSwitchGovernor.Run() doesn't care at all where the sunrise/sunset times came from, it just asks a TimedThemeState for the next/current switch time. The actual "custom vs location vs coordinates" branching happens one layer down, in TimedThemeState.Calculate():

Sunrise = builder.Config.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Jay-o-Way
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-internal Internal issue, created for transparency, could be a code task
2 participants