fix module hidden status

This commit is contained in:
Joseph Bethge 2017-01-28 12:26:52 +01:00
parent 6e2f1f72c6
commit d3c0b9a438
2 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611)) - Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611))
- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit. - If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit.
- Module currentWeather: check if temperature received from api is defined. - Module currentWeather: check if temperature received from api is defined.
- Fix an issue with module hidden status changing to `true` although lock string prevented showing it
## [2.1.0] - 2016-12-31 ## [2.1.0] - 2016-12-31

View File

@ -232,6 +232,8 @@ var MM = (function() {
return; return;
} }
module.hidden = false;
// If forced show, clean current lockstrings. // If forced show, clean current lockstrings.
if (module.lockStrings.length !== 0 && options.force === true) { if (module.lockStrings.length !== 0 && options.force === true) {
Log.log("Force show of module: " + module.name); Log.log("Force show of module: " + module.name);
@ -504,7 +506,7 @@ var MM = (function() {
* argument options object - Optional settings for the hide method. * argument options object - Optional settings for the hide method.
*/ */
showModule: function(module, speed, callback, options) { showModule: function(module, speed, callback, options) {
module.hidden = false; // do not change module.hidden yet, only if we really show it later
showModule(module, speed, callback, options); showModule(module, speed, callback, options);
} }
}; };