Activate timer before modules and activate always on-demand timer first

This commit is contained in:
Romain Vigier
2020-12-03 11:47:34 +01:00
parent f4756eb470
commit 69b997c659
8 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -78,13 +78,13 @@ function start() {
commander = new Commander();
settings.enable();
timer.enable();
gtkThemer.enable();
shellThemer.enable();
iconThemer.enable();
cursorThemer.enable();
backgrounder.enable();
commander.enable();
timer.enable();
enabled = true;
logDebug('Extension enabled.');
+1
View File
@@ -44,6 +44,7 @@ var Backgrounder = class {
if (e.settings.backgrounds.enabled) {
this._connectSettings();
this._connectTimer();
this._changeSystemBackground(e.timer.time);
}
logDebug('Backgrounder enabled.');
}
+3 -1
View File
@@ -37,8 +37,10 @@ var Commander = class {
enable() {
logDebug('Enabling Commander...');
this._watchStatus();
if (e.settings.commands.enabled)
if (e.settings.commands.enabled) {
this._connectTimer();
this._spawnCommand(e.timer.time);
}
logDebug('Commander enabled.');
}
+1
View File
@@ -43,6 +43,7 @@ var CursorThemer = class {
if (e.settings.cursorVariants.enabled) {
this._connectSettings();
this._connectTimer();
this._setSystemVariant(e.timer.time);
}
logDebug('Cursor Themer enabled.');
}
+2 -3
View File
@@ -57,6 +57,7 @@ var GtkThemer = class {
this._connectSettings();
this._updateVariants();
this._connectTimer();
this._setSystemVariant(e.timer.time);
}
} catch (error) {
notifyError(error);
@@ -142,11 +143,9 @@ var GtkThemer = class {
}
}
_onManualChanged(_settings, enabled) {
_onManualChanged(_settings, _enabled) {
this.disable();
this.enable();
if (enabled)
this._setSystemVariant(e.timer.time);
}
_onTimeChanged(_timer, newTime) {
+1
View File
@@ -43,6 +43,7 @@ var IconThemer = class {
if (e.settings.iconVariants.enabled) {
this._connectSettings();
this._connectTimer();
this._setSystemVariant(e.timer.time);
}
logDebug('Icon Themer enabled.');
}
+2 -3
View File
@@ -57,6 +57,7 @@ var ShellThemer = class {
this._connectSettings();
this._updateVariants();
this._connectTimer();
this._setSystemVariant(e.timer.time);
}
} catch (error) {
notifyError(error);
@@ -142,11 +143,9 @@ var ShellThemer = class {
}
}
_onManualChanged(_settings, enabled) {
_onManualChanged(_settings, _enabled) {
this.disable();
this.enable();
if (enabled)
this._setSystemVariant(e.timer.time);
}
_onTimeChanged(_timer, newTime) {
+1 -1
View File
@@ -125,7 +125,7 @@ var Timer = class {
}
if (e.settings.time.alwaysEnableOndemand && ['nightlight', 'location', 'schedule'].includes(source))
this._sources.push(new TimerOndemand());
this._sources.unshift(new TimerOndemand());
}
_enableSources() {