From 9ec0a276770c5dabebaf6b756b5f14a9027f7aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Hn=C3=A1t?= Date: Thu, 3 Nov 2022 12:09:09 +0100 Subject: [PATCH] Live feed finaly working --- dashboard_static/lib/tweets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard_static/lib/tweets.js b/dashboard_static/lib/tweets.js index 94bc051..0f45d4a 100644 --- a/dashboard_static/lib/tweets.js +++ b/dashboard_static/lib/tweets.js @@ -95,8 +95,9 @@ block.fn.tweets = function(config) { $list.replaceChildren(); // tweets = filterTweets(tweets, filters.blockedWords, filters.searchedWords + filters.sports, filters.sorted, filters.order); // tweets = sortTweets(tweets); + var displayTweets = tweets.reverse().slice(0, options.memory).reverse(); for (i = 0; i < options.memory-1; i++){ - $list.prepend(tweetCell(tweets[i])); + $list.prepend(tweetCell(displayTweets[i])); } });