Extension: Remove unused enabled global variable

This commit is contained in:
Romain Vigier
2022-03-13 18:55:57 +01:00
parent 8cc8498bb6
commit 5f93618387
3 changed files with 0 additions and 13 deletions
-5
View File
@@ -16,9 +16,6 @@ const { SwitcherThemeCursor, SwitcherThemeGtk, SwitcherThemeIcon, SwitcherThemeS
const { Timer } = Me.imports.modules.Timer;
var enabled = false;
class NightThemeSwitcher {
#timer = null;
#switcherThemeGtk = null;
@@ -58,7 +55,6 @@ class NightThemeSwitcher {
this.#switcherThemeCursor.enable();
this.#switcherCommands.enable();
enabled = true;
console.debug('Extension started.');
}
@@ -67,7 +63,6 @@ class NightThemeSwitcher {
// to enable the color scheme switch while the lock screen is displayed,
// as the background image and the shell theme are visible in this mode.
console.debug('Disabling extension...');
enabled = false;
if (this.#switcherThemeGtk) {
this.#switcherThemeGtk.disable();
-4
View File
@@ -184,10 +184,6 @@ var TimerLocation = class {
#watchForTimeChange() {
console.debug('Watching for time change...');
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 GLib.SOURCE_REMOVE;
}
if (this.#previouslyDaytime !== this.#isDaytime()) {
this.#previouslyDaytime = this.#isDaytime();
this.emit('time-changed', this.time);
-4
View File
@@ -58,10 +58,6 @@ var TimerSchedule = class {
#watchForTimeChange() {
console.debug('Watching for time change...');
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 GLib.SOURCE_REMOVE;
}
if (this.#previouslyDaytime !== this.#isDaytime()) {
this.#previouslyDaytime = this.#isDaytime();
this.emit('time-changed', this.time);