From dd28ee7a744786c91830ff8b623581da78ab1169 Mon Sep 17 00:00:00 2001 From: Pradeep G Date: Thu, 3 Oct 2024 13:13:18 +0530 Subject: [PATCH] feat: detect Dark/Light mode-change on enable #79 --- openbar@neuromorph/extension.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openbar@neuromorph/extension.js b/openbar@neuromorph/extension.js index 2efb430..7acdce0 100644 --- a/openbar@neuromorph/extension.js +++ b/openbar@neuromorph/extension.js @@ -1441,10 +1441,8 @@ export default class Openbar extends Extension { else { // If mode was changed (by script/extension) while OpenBar was disabled (screen-lock), // detect mode-change and update styles - let bguriDark = this._bgSettings.get_string('picture-uri-dark'); - let bguriLight = this._bgSettings.get_string('picture-uri'); - let currentBgUri = (this.colorScheme == 'prefer-dark') ? bguriDark : bguriLight; - if(bguri != currentBgUri) + let obarScheme = this._settings.get_string('color-scheme'); + if(obarScheme != this.colorScheme) this.onModeChange(); }