From 0600b25cda1abf2076d23752bf6ad0182282a5a5 Mon Sep 17 00:00:00 2001 From: Seif Soliman Date: Thu, 29 May 2025 14:35:21 +0300 Subject: [PATCH] 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(). --- frontend/src/ts/elements/settings/theme-picker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/ts/elements/settings/theme-picker.ts b/frontend/src/ts/elements/settings/theme-picker.ts index 3df918c88..59bf783ea 100644 --- a/frontend/src/ts/elements/settings/theme-picker.ts +++ b/frontend/src/ts/elements/settings/theme-picker.ts @@ -480,4 +480,7 @@ ConfigEvent.subscribe((eventKey) => { if (eventKey === "theme" && ActivePage.get() === "settings") { updateActiveButton(); } + if (eventKey === "favThemes" && ActivePage.get() === "settings") { + void refreshPresetButtons(); + } });