mirror of
https://github.com/vinliao/nashboard-old.git
synced 2025-12-17 04:35:15 +01:00
remove duplicate on recent events
This commit is contained in:
@@ -115,7 +115,7 @@
|
|||||||
|
|
||||||
// todo: bug: still display duplicate tweets at time
|
// todo: bug: still display duplicate tweets at time
|
||||||
tweets.push(tweet);
|
tweets.push(tweet);
|
||||||
const uniqueTweets = _.uniq(tweets);
|
const uniqueTweets = _.uniq(tweets, tweet => tweet.time);
|
||||||
const sortedTweets = _.sortBy(uniqueTweets, "time");
|
const sortedTweets = _.sortBy(uniqueTweets, "time");
|
||||||
tweets = sortedTweets.reverse().slice(0, 20);
|
tweets = sortedTweets.reverse().slice(0, 20);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user