From 55a161fafeb4081379c77d02823e3c66995f9c91 Mon Sep 17 00:00:00 2001 From: Edward Shen <6173958+edward-shen@users.noreply.github.com> Date: Tue, 15 May 2018 20:32:02 -0400 Subject: [PATCH] Fixes #1282. Added a runtime var isShowingDescription that gets reset to user config. this.config.showDescription no longer mutates during runtime. Changelog has been updated to include this fix. --- CHANGELOG.md | 1 + modules/default/newsfeed/newsfeed.js | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de175268a4..dc633675dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed browser-side code to work on the Midori browser. - Fixed issue where heat index was reporting incorrect values in Celsius and Fahrenheit. [#1263](https://github.com/MichMich/MagicMirror/issues/1263) - Fixed weatherforecast to use dt_txt field instead of dt to handle timezones better +- newsfeed now remembers to show the description when `"ARTICLE_LESS_DETAILS"` is called if the user wants to always show the description. [#1282](https://github.com/MichMich/MagicMirror/issues/1282) ### Updated - Updated Italian translation diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index 228a353a80..aa55d48d5f 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -67,6 +67,7 @@ Module.register("newsfeed",{ this.registerFeeds(); + this.isShowingDescription = this.config.showDescription; }, // Override socket notification handler. @@ -133,7 +134,7 @@ Module.register("newsfeed",{ if (this.config.removeStartTags == "description" || this.config.removeStartTags == "both") { - if (this.config.showDescription) { + if (this.isShowingDescription) { for (f=0; f