Skip to content

Commit

Permalink
Fixed lockString usage for mmm-pages compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Litzenburger committed Sep 14, 2021
1 parent e916108 commit f4e2215
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions MMM-RAIN-MAP.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmm-rain-map",
"version": "2.4.0",
"version": "2.4.1",
"description": "A Rain Radar Map based on the Rainviewer API for the MagicMirror² platform.",
"main": "MMM-RAIN-MAP.js",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,13 @@ Module.register<Config>('MMM-RAIN-MAP', {
if (currentCondition && Utils.rainConditions.findIndex((condition) => currentCondition.includes(condition)) >= 0) {
if (!this._runtimeData.animationTimer) {
Utils.changeSubstituteModuleVisibility(false, this.config)
this.show(300, null, { lockString: this.identifier })
this.show(300, ()=>{}, { lockString: this.identifier })
this.play()
}
} else {
if (this._runtimeData.animationTimer) {
this.hide(300, null, { lockString: this.identifier })
console.log("hide with", { lockString: this.identifier })
this.hide(300, ()=>{}, { lockString: this.identifier })
clearTimeout(this._runtimeData.animationTimer)
this._runtimeData.animationTimer = null
Utils.changeSubstituteModuleVisibility(true, this.config)
Expand Down

0 comments on commit f4e2215

Please sign in to comment.