Does not show posts + Double Header
Closed this issue · 2 comments
Steps to achieve current state:
- git clone
- (tried with and without) npm install nodemon and sass
- add module to config.js
Code in config file (provided in README.md):
{ module: "MMM-Reddit", position: "center", config: { subreddit: ['television', 'science', 'nottheonion'], headerType: 'chained', displayType: 'headlines', count: 14, show: 7, width: 700, showScore: false, showSubreddit: true, colorText: false, showThumbnail: false, } },
After fiddling with it for a while it is working.
I don't know why, but won't touch it lol:
Current code in config.js:
{ module: "MMM-Reddit", position: "top_right", config: { subreddit: "hackernews", displayType: "headlines", imageQuality: "high", count: 10, show: 5, width: 500, showAll: true, } },
The double header doesn't dissapear tho, will update if I manage to fix it
Fixed the double header with a temporal fix. The bug should be more carefully looked, but with a quick look I managed to edit "MMM-Reddit.js" to fix the double header:
Just make the function getHeader () return "" instead of this.getHeaderText();
Currently in line 283:
/** * Return a string to be used as header text * TODO: Refactor this - ideally implement some sort of templatization * * @return {String} */ getHeader () { if (this.config.showHeader) { // return
${this.config.type} posts from r/${this.config.subreddit}; return ""; //this.getHeaderText(); } },