mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-28 11:56:44 -06:00
Replace deprecated MediaQueryList.addListener()
(#12112)
This commit is contained in:
parent
9dcccbc8e1
commit
4a832e87c0
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ export async function common(createVue: () => App<Element>) {
|
||||||
defaultStore.set('darkMode', isDeviceDarkmode());
|
defaultStore.set('darkMode', isDeviceDarkmode());
|
||||||
}
|
}
|
||||||
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => {
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (mql) => {
|
||||||
if (ColdDeviceStorage.get('syncDeviceDarkMode')) {
|
if (ColdDeviceStorage.get('syncDeviceDarkMode')) {
|
||||||
defaultStore.set('darkMode', mql.matches);
|
defaultStore.set('darkMode', mql.matches);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue