about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-18 14:05:19 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-18 14:05:19 -0600
commitfbb9689e4a0c32244bf8cdcae48783bd1f2f7c10 (patch)
treec44eadd81f2fa187ccd7c96785424dcd895f44ea /src
parent6e2b7a0b90ae8140d81d2d66c87ec9e40d9f45ec (diff)
downloadvoidsky-fbb9689e4a0c32244bf8cdcae48783bd1f2f7c10.tar.zst
Dedup posts in the home TL
Diffstat (limited to 'src')
-rw-r--r--src/state/models/feed-view.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts
index f2c4f1f45..2cd6b591c 100644
--- a/src/state/models/feed-view.ts
+++ b/src/state/models/feed-view.ts
@@ -388,6 +388,16 @@ export class FeedModel {
     this.hasMore = !!this.loadMoreCursor
     let counter = this.feed.length
     for (const item of res.data.feed) {
+      // HACK
+      // deduplicate posts on the home feed
+      // (should be done on the server)
+      // -prf
+      if (this.feedType === 'home') {
+        if (this.feed.find(item2 => item2.uri === item.uri)) {
+          continue
+        }
+      }
+
       this._append(counter++, item)
     }
   }