Skip to content

[Light Switch] Fix Light Switch start up logic#45304

Merged
vanzue merged 1 commit intomicrosoft:mainfrom
Jaylyn-Barbee:jay/night-light-reset
Feb 3, 2026
Merged

[Light Switch] Fix Light Switch start up logic#45304
vanzue merged 1 commit intomicrosoft:mainfrom
Jaylyn-Barbee:jay/night-light-reset

Conversation

@Jaylyn-Barbee
Copy link
Copy Markdown
Contributor

@Jaylyn-Barbee Jaylyn-Barbee commented Feb 2, 2026

Summary of the Pull Request

Title

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected

Detailed Description of the Pull Request / Additional comments

Before, there was a function that initialized some variables about the current system state that were later used to check against if that state needed to change in a different function. That caused from some issues because I was reusing the function for a double purpose. Now the SyncInitialThemeState() function in the State Manager will sync those initial variables and apply the correct theme if needed.

I also removed an unnecessary parameter from onTick

Validation Steps Performed

Manual testing

@Jaylyn-Barbee Jaylyn-Barbee changed the title [Light Switch] Fix the step that initializes the state on start up [Light Switch] Fix Light Switch start up logic Feb 2, 2026
@github-actions

This comment was marked as outdated.

@vanzue vanzue merged commit b3e7c9d into microsoft:main Feb 3, 2026
11 checks passed
vanzue pushed a commit that referenced this pull request Feb 5, 2026
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Title

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #45291
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
Before, there was a function that initialized some variables about the
current system state that were later used to check against if that state
needed to change in a different function. That caused from some issues
because I was reusing the function for a double purpose. Now the
`SyncInitialThemeState()` function in the State Manager will sync those
initial variables and apply the correct theme if needed.

I also removed an unnecessary parameter from `onTick`

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Manual testing
@vanzue vanzue added this to the PowerToys 0.97 milestone Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants