Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ _This release is scheduled to be released on 2021-01-01._
- 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)
- Fix calendar fetcher subsequent timing (#2160)
- The core is now checking to see if a module is hidden before it calls `getDom()`. This prevents unwanted dom updates. (#2164)
- currentweather and weatherforecast always showing themselves on each update

## [2.13.0] - 2020-10-01

Expand Down
4 changes: 4 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ var MM = (function () {
* @returns {Promise} Resolved when the dom is fully updated.
*/
var updateDom = function (module, speed) {
if (module.hidden) {
return new Promise(function (resolve) {});
}

return new Promise(function (resolve) {
var newContentPromise = module.getDom();
var newHeader = module.getHeader();
Expand Down
6 changes: 4 additions & 2 deletions modules/default/currentweather/currentweather.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,10 @@ 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;
if (!this.loaded) {
this.show(this.config.animationSpeed, { lockString: this.identifier });
this.loaded = true;
}
this.updateDom(this.config.animationSpeed);
this.sendNotification("CURRENTWEATHER_DATA", { data: data });
},
Expand Down
6 changes: 4 additions & 2 deletions modules/default/weatherforecast/weatherforecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,10 @@ Module.register("weatherforecast", {
}

//Log.log(this.forecast);
this.show(this.config.animationSpeed, { lockString: this.identifier });
this.loaded = true;
if (!this.loaded) {
this.show(this.config.animationSpeed, { lockString: this.identifier });
this.loaded = true;
}
this.updateDom(this.config.animationSpeed);
},

Expand Down