about summary refs log tree commit diff
path: root/src/view/com/posts/Feed.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-07-04 20:07:42 +0100
committerGitHub <noreply@github.com>2024-07-04 20:07:42 +0100
commit12bf79629370b59eaf3a8f052fef60bcf745fcf2 (patch)
treefccb629823e9f5bd8dccdf91323377aa2641e3b4 /src/view/com/posts/Feed.tsx
parent4f02da96c8c2483923fdf52d1ee7cd8f34b15fba (diff)
downloadvoidsky-12bf79629370b59eaf3a8f052fef60bcf745fcf2.tar.zst
Fix feed feedback (#4730)
Diffstat (limited to 'src/view/com/posts/Feed.tsx')
-rw-r--r--src/view/com/posts/Feed.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx
index e6ad35610..27f75b41a 100644
--- a/src/view/com/posts/Feed.tsx
+++ b/src/view/com/posts/Feed.tsx
@@ -156,6 +156,14 @@ const interstials: Record<
   ],
 }
 
+export function getFeedPostSlice(feedItem: FeedItem): FeedPostSlice | null {
+  if (feedItem.type === 'slice') {
+    return feedItem.slice
+  } else {
+    return null
+  }
+}
+
 // DISABLED need to check if this is causing random feed refreshes -prf
 // const REFRESH_AFTER = STALE.HOURS.ONE
 const CHECK_LATEST_AFTER = STALE.SECONDS.THIRTY