Fix mobile sidebar reset after theme switch (#152)

This commit is contained in:
Mohamed Boudra
2026-03-28 11:50:24 +08:00
committed by GitHub
parent 1b0fe4aa47
commit 9ad3e7661b
5 changed files with 141 additions and 43 deletions
@@ -896,12 +896,6 @@ export default function SettingsScreen() {
const handleThemeChange = useCallback(
(newTheme: AppSettings["theme"]) => {
void updateSettings({ theme: newTheme });
if (newTheme === "auto") {
UnistylesRuntime.setAdaptiveThemes(true);
} else {
UnistylesRuntime.setAdaptiveThemes(false);
UnistylesRuntime.setTheme(newTheme);
}
},
[updateSettings],
);