mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 15:09:59 +02:00
Refactor ZenThemesImporter to update Zen themes only when the window is active
This commit is contained in:
parent
9ae715276c
commit
6fc85d1c09
1 changed files with 5 additions and 0 deletions
|
@ -106,6 +106,11 @@ var gZenThemeImporter = new (class {
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateStylesheet() {
|
async updateStylesheet() {
|
||||||
|
if (Services.focus.activeWindow !== window) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('ZenThemeImporter: Updating Zen themes');
|
||||||
await this.removeStylesheet();
|
await this.removeStylesheet();
|
||||||
|
|
||||||
const themes = Object.values(await ZenThemesCommon.getThemes());
|
const themes = Object.values(await ZenThemesCommon.getThemes());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue