mirror of
https://github.com/fmhy/edit.git
synced 2026-01-12 23:11:06 +11:00
attempt like 6?
This commit is contained in:
parent
dc9cb94e88
commit
84543b58d5
1 changed files with 6 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ export class ThemeHandler {
|
|||
}
|
||||
|
||||
// Set amoled preference
|
||||
this.amoledEnabled.value = savedAmoled || true
|
||||
this.amoledEnabled.value = savedAmoled || false
|
||||
|
||||
// Set mode
|
||||
if (savedMode) {
|
||||
|
|
@ -60,6 +60,11 @@ export class ThemeHandler {
|
|||
this.state.value.currentMode = prefersDark ? 'dark' : 'light'
|
||||
}
|
||||
|
||||
// if the saved mode is not 'dark' and the user refreshes the page, set it to the system preference
|
||||
if (this.state.value.currentMode !== 'dark' && savedMode !== 'dark') {
|
||||
this.state.value.currentMode = prefersDark ? 'dark' : 'light'
|
||||
}
|
||||
|
||||
this.applyTheme()
|
||||
|
||||
// Listen for system theme changes (only if user hasn't set a preference)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue