remove amoled default

This commit is contained in:
Samidy 2025-12-10 10:25:58 -08:00 committed by GitHub
parent 06bcc47284
commit 18995b8ded
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,7 @@ export class ThemeHandler {
// Load saved preferences // Load saved preferences
const savedTheme = localStorage.getItem(STORAGE_KEY_THEME) || 'christmas' const savedTheme = localStorage.getItem(STORAGE_KEY_THEME) || 'christmas'
const savedMode = localStorage.getItem(STORAGE_KEY_MODE) as DisplayMode | null 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 // Set theme
if (themeRegistry[savedTheme]) { if (themeRegistry[savedTheme]) {
@ -49,7 +49,7 @@ export class ThemeHandler {
} }
// Set amoled preference // Set amoled preference
this.amoledEnabled.value = savedAmoledPref === null ? true : savedAmoledPref === 'true' this.amoledEnabled.value = savedAmoled
// Set mode // Set mode
if (savedMode) { if (savedMode) {
@ -60,7 +60,6 @@ export class ThemeHandler {
this.state.value.currentMode = prefersDark ? 'dark' : 'light' this.state.value.currentMode = prefersDark ? 'dark' : 'light'
} }
this.applyTheme() this.applyTheme()
// Listen for system theme changes (only if user hasn't set a preference) // Listen for system theme changes (only if user hasn't set a preference)
@ -103,11 +102,6 @@ export class ThemeHandler {
if (mode === 'dark') { if (mode === 'dark') {
root.classList.add('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) { private applyCSSVariables(colors: ModeColors, theme: Theme) {