This is an automated email from the git hooks/post-receive script.
cohosh pushed a commit to branch main in repository pluggable-transports/snowflake-webext.
The following commit(s) were added to refs/heads/main by this push: new 225a7d2 fix for #41 ui shows disabled correctly when disabling active snowflake badge 225a7d2 is described below
commit 225a7d2332a46447c2738c95605b574be9cf3246 Author: 5eba 5eba@untiy-mail.de AuthorDate: Fri Mar 18 18:06:02 2022 +0100
fix for #41 ui shows disabled correctly when disabling active snowflake badge --- init-badge.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/init-badge.js b/init-badge.js index 70699b0..da50045 100644 --- a/init-badge.js +++ b/init-badge.js @@ -61,6 +61,7 @@ class BadgeUI extends UI { }
turnOn() { + this.enabled = true; const clients = this.active ? 1 : 0; if (clients > 0) { this.setIcon('running'); @@ -74,13 +75,16 @@ class BadgeUI extends UI { }
turnOff() { + this.enabled = false; this.setIcon('off'); this.popup.turnOff(); }
setActive(connected) { super.setActive(connected); - this.turnOn(); + if(this.enabled) { + this.turnOn(); + } }
setIcon(status) {