diff --git a/src/extension.js b/src/extension.js index ed65cbc..02b4cce 100644 --- a/src/extension.js +++ b/src/extension.js @@ -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(); diff --git a/src/modules/TimerLocation.js b/src/modules/TimerLocation.js index d050f2a..8e45243 100644 --- a/src/modules/TimerLocation.js +++ b/src/modules/TimerLocation.js @@ -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); diff --git a/src/modules/TimerSchedule.js b/src/modules/TimerSchedule.js index 233891f..eb12f2b 100644 --- a/src/modules/TimerSchedule.js +++ b/src/modules/TimerSchedule.js @@ -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);