Extension: Replace returned booleans in GLib sources by constants
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ class NightThemeSwitcher {
|
||||
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||
while (!extensionManager._initialized)
|
||||
continue;
|
||||
return false;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
console.debug('Extension Manager initialized.');
|
||||
resolve();
|
||||
|
||||
@@ -165,7 +165,7 @@ var TimerLocation = class {
|
||||
console.debug('Regularly updating sun times...');
|
||||
this.#regularlyUpdateSuntimesTimer = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 3600, () => {
|
||||
this.#updateSuntimes();
|
||||
return true; // Repeat the loop
|
||||
return GLib.SOURCE_CONTINUE;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -186,13 +186,13 @@ var TimerLocation = class {
|
||||
this.#timeChangeTimer = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => {
|
||||
if (!Me.imports.extension.enabled) {
|
||||
// The extension doesn't exist anymore, quit the loop
|
||||
return false;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
if (this.#previouslyDaytime !== this.#isDaytime()) {
|
||||
this.#previouslyDaytime = this.#isDaytime();
|
||||
this.emit('time-changed', this.time);
|
||||
}
|
||||
return true; // Repeat the loop
|
||||
return GLib.SOURCE_CONTINUE;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -60,13 +60,13 @@ var TimerSchedule = class {
|
||||
this.#timeChangeTimer = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => {
|
||||
if (!Me.imports.extension.enabled) {
|
||||
// The extension doesn't exist anymore, quit the loop
|
||||
return false;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
if (this.#previouslyDaytime !== this.#isDaytime()) {
|
||||
this.#previouslyDaytime = this.#isDaytime();
|
||||
this.emit('time-changed', this.time);
|
||||
}
|
||||
return true; // Repeat the loop
|
||||
return GLib.SOURCE_CONTINUE;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user