fix(web): don't insert activities already seen
this happens because we're paginating with just an offset, meaning that when new activities get inserted that offset "gets shifted forward" and we receive again some activities we saw already. this should get fixed for good on the backend, but for now discarding them here makes it usable
This commit is contained in:
parent
6c92328b8d
commit
1a3cc5e2ff
1 changed files with 5 additions and 1 deletions
|
@ -35,7 +35,11 @@ impl Timeline {
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let mut feed = self.feed.get();
|
let mut feed = self.feed.get();
|
||||||
let mut older = process_activities(activities, auth).await;
|
let mut older = process_activities(activities, auth)
|
||||||
|
.await
|
||||||
|
.into_iter()
|
||||||
|
.filter(|x| !feed.contains(x))
|
||||||
|
.collect();
|
||||||
feed.append(&mut older);
|
feed.append(&mut older);
|
||||||
self.feed.set(feed);
|
self.feed.set(feed);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue