remove amoled default (#4427)

This commit is contained in:
Samidy
2025-12-10 10:42:26 -08:00
committed by GitHub
parent 06bcc47284
commit 1dda502975

View File

@@ -40,7 +40,7 @@ export class ThemeHandler {
// Load saved preferences
const savedTheme = localStorage.getItem(STORAGE_KEY_THEME) || 'christmas'
const savedMode = localStorage.getItem(STORAGE_KEY_MODE) as DisplayMode | null
const savedAmoledPref = localStorage.getItem(STORAGE_KEY_AMOLED)
const savedAmoled = localStorage.getItem(STORAGE_KEY_AMOLED) === 'true'
// Set theme
if (themeRegistry[savedTheme]) {
@@ -49,7 +49,7 @@ export class ThemeHandler {
}
// Set amoled preference
this.amoledEnabled.value = savedAmoledPref === null ? true : savedAmoledPref === 'true'
this.amoledEnabled.value = savedAmoled
// Set mode
if (savedMode) {
@@ -59,7 +59,6 @@ export class ThemeHandler {
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
this.state.value.currentMode = prefersDark ? 'dark' : 'light'
}
this.applyTheme()
@@ -103,11 +102,6 @@ export class ThemeHandler {
if (mode === 'dark') {
root.classList.add('dark')
}
// Remove amoled class if current mode is not 'dark'
if (mode !== 'dark') {
root.classList.remove('amoled')
}
}
private applyCSSVariables(colors: ModeColors, theme: Theme) {
@@ -401,4 +395,4 @@ export function useTheme() {
toggleAmoled: () => handler.toggleAmoled(),
state
}
}
}