From 7462d61e169ac04a46175b2ddb9efaab4a84a8fe Mon Sep 17 00:00:00 2001 From: Erik Pettersson Date: Sun, 11 Oct 2020 21:35:42 +0200 Subject: [PATCH 1/3] Makes the module stay hidden without a lock. When this module is hidden from another module, it un-hides itself when it updates itself. With this change it stays hidden, as it should. :) --- modules/default/currentweather/currentweather.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 0a43b23e..376732a9 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -495,11 +495,12 @@ Module.register("currentweather", { this.sunriseSunsetTime = timeString; this.sunriseSunsetIcon = sunrise < now && sunset > now ? "wi-sunset" : "wi-sunrise"; - - this.show(this.config.animationSpeed, { lockString: this.identifier }); - this.loaded = true; - this.updateDom(this.config.animationSpeed); - this.sendNotification("CURRENTWEATHER_DATA", { data: data }); + if (!this.hidden) { + this.show(this.config.animationSpeed, { lockString: this.identifier }); + this.loaded = true; + this.updateDom(this.config.animationSpeed); + this.sendNotification("CURRENTWEATHER_DATA", { data: data }); + } }, /* scheduleUpdate() From ecd9828afc11bc09c64164724e2746f57e371fea Mon Sep 17 00:00:00 2001 From: Erik Pettersson Date: Sun, 11 Oct 2020 21:37:00 +0200 Subject: [PATCH 2/3] Makes the module stay hidden without a lock. When this module is hidden from another module, it un-hides itself when it updates itself. With this change it stays hidden, as it should. :) --- modules/default/weatherforecast/weatherforecast.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index 4ecc18aa..f8550022 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -408,9 +408,11 @@ Module.register("weatherforecast", { } //Log.log(this.forecast); - this.show(this.config.animationSpeed, { lockString: this.identifier }); - this.loaded = true; - this.updateDom(this.config.animationSpeed); + if (!this.hidden) { + this.show(this.config.animationSpeed, { lockString: this.identifier }); + this.loaded = true; + this.updateDom(this.config.animationSpeed); + } }, /* scheduleUpdate() From 644aa26b7571cfce7f0afa7d647482d94f1a0c5a Mon Sep 17 00:00:00 2001 From: Erik Pettersson Date: Sun, 11 Oct 2020 21:41:59 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md Added the "currentwather" and "watherforcast" update show fixes information. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb61bd24..5777142d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ _This release is scheduled to be released on 2021-01-01._ ### Fixed +- Fixed the "un-hide on update" problem with "currentwather" and "watherforcast" modules. - JSON Parse translation files with comments crashing UI. (#2149) - Calendar parsing where RRULE bug returns wrong date, add Windows timezone name support. (#2145, #2151) - Wrong node-ical version installed (package.json) requested version. (#2153)