fix(settings page): ui not updating on favorite themes change via commandline (@byseif21) (#6567)

### Description
When using the command line to add or remove a theme from favorites
while on the settings page, the favorites UI would not reflect the
changes until the user manually refreshed the page or changed the theme.
This caused confusion, despite the changes being correctly saved in the
config.

**Solution**
Added a ConfigEvent subscription in theme-picker.ts to listen for
"favThemes" updates. If the active page is "settings", the UI is now
refreshed immediately by calling refreshPresetButtons().
This commit is contained in:
Seif Soliman 2025-05-29 14:35:21 +03:00 committed by GitHub
parent 04fbd81c10
commit 0600b25cda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -480,4 +480,7 @@ ConfigEvent.subscribe((eventKey) => {
if (eventKey === "theme" && ActivePage.get() === "settings") {
updateActiveButton();
}
if (eventKey === "favThemes" && ActivePage.get() === "settings") {
void refreshPresetButtons();
}
});