mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Fix Deprecation Issue
This commit is contained in:
@@ -344,7 +344,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
|||||||
}
|
}
|
||||||
|
|
||||||
onDefaultSystemThemeChange(callback: ((theme: 'light' | 'dark') => unknown)) {
|
onDefaultSystemThemeChange(callback: ((theme: 'light' | 'dark') => unknown)) {
|
||||||
this.prefersColorSchemeDark.addListener(({ matches }) => {
|
this.prefersColorSchemeDark.addEventListener('change', ({ matches }) => {
|
||||||
callback(matches ? 'dark' : 'light');
|
callback(matches ? 'dark' : 'light');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user