Repository navigation
fix(theme): regenerate once when the matugen scheme or monitor changes - #3793
Merged
Merged
Conversation
matugenScheme and matugenTargetMonitor declare the regenSystemThemes onChange hook, which set() already runs. Their setters also called Theme.generateSystemThemesFromCurrentTheme() themselves, so the second request queued behind the first and matugen ran twice per change. Drop the direct calls and the comment that pointed out the redundancy.
Member
|
/claude review |
Contributor
Claude reviewLooks good: the removed calls duplicated the No issues found. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes matugen running twice when the Matugen Palette or the target monitor changes.
Both settings declare the
regenSystemThemesonChange hook, whichset()already runs. Their setters also calledTheme.generateSystemThemesFromCurrentTheme()themselves, so the second request queued behind the first and the whole theme was generated twice per change. I removed the direct calls, plus a comment insetMatugenSourceModethat pointed out this redundancy. I checked the other onChange hooks for the same pattern and found none.Type of change
Related issues
None.
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warningsTested by hand on Hyprland: switching the palette now logs one "Setting desired theme" per change instead of a second queued run, and the colors still update. No new strings, no docs needed. All pre-commit hooks passed; I didn't run
make lint-qmlfor this one.