From 7462d61e169ac04a46175b2ddb9efaab4a84a8fe Mon Sep 17 00:00:00 2001 From: Erik Pettersson Date: Sun, 11 Oct 2020 21:35:42 +0200 Subject: [PATCH] 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()