Merge branch 'safari-mediaquerychange' of JustAMacUser/tt-rss into master

This commit is contained in:
fox 2019-12-13 18:54:16 +00:00 committed by Gogs
commit e146a1ab37
1 changed files with 5 additions and 3 deletions

View File

@ -34,9 +34,11 @@ define(["dojo/_base/declare"], function (declare) {
if (window.matchMedia) { if (window.matchMedia) {
const mql = window.matchMedia('(prefers-color-scheme: dark)'); const mql = window.matchMedia('(prefers-color-scheme: dark)');
mql.addEventListener("change", () => { try {
this.nightModeChanged(mql.matches); mql.addEventListener("change", () => {
}); this.nightModeChanged(mql.matches);
});
} catch (e) {}
this.nightModeChanged(mql.matches); this.nightModeChanged(mql.matches);
} }