removed redundant timeout

This commit is contained in:
Icy 2025-12-09 14:52:10 +05:30
parent 2f2aff8614
commit be79cf4652

View file

@ -65,7 +65,6 @@ export class ThemeHandler {
// Listen for system theme changes (only if user hasn't set a preference)
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
setTimeout(() => {
if (!localStorage.getItem(STORAGE_KEY_MODE)) {
this.state.value.currentMode = e.matches ? 'dark' : 'light'
this.applyTheme()
@ -73,7 +72,6 @@ export class ThemeHandler {
else {
this.applyTheme()
}
}, 10)
})
}