From c3712b095417a89e4274110a47b2b5ccb0dcd8ca Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Thu, 30 Jan 2025 17:11:32 -0500 Subject: [PATCH] Clear dummy app if icon is hidden --- taskbar.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/taskbar.js b/taskbar.js index 773252b..afcf727 100644 --- a/taskbar.js +++ b/taskbar.js @@ -102,9 +102,12 @@ let donateDummyApp = { } function setDonateApp() { - this._donateApp = Object.create(donateDummyApp) - this._donateApp._taskbar = this - this._donateApp.visible = !SETTINGS.get_string('hide-donate-icon-unixtime') + delete this._donateApp + + if (!SETTINGS.get_string('hide-donate-icon-unixtime')) { + this._donateApp = Object.create(donateDummyApp) + this._donateApp._taskbar = this + } } /** @@ -980,7 +983,7 @@ export const Taskbar = class extends EventEmitter { .filter(appInfo => appInfo.windows.length || favoriteApps.indexOf(appInfo.app) >= 0); } - if (this._donateApp.visible) + if (this._donateApp) appInfos = [ { app: this._donateApp,