Refactor ZenThemesImporter to update Zen themes only when the window is active

This commit is contained in:
mauro-balades 2024-09-21 18:26:15 +02:00
parent 9ae715276c
commit 6fc85d1c09

View file

@ -106,6 +106,11 @@ var gZenThemeImporter = new (class {
}
async updateStylesheet() {
if (Services.focus.activeWindow !== window) {
return;
}
console.log('ZenThemeImporter: Updating Zen themes');
await this.removeStylesheet();
const themes = Object.values(await ZenThemesCommon.getThemes());