Bluesky app fork with some witchin' additions 💫

Keep interstitial fresh on refresh (#4888)

authored by danabra.mov and committed by

GitHub a864f698 00fea107

+5 -3
+5 -3
src/view/com/posts/Feed.tsx
··· 212 212 isFetchingNextPage, 213 213 fetchNextPage, 214 214 } = usePostFeedQuery(feed, feedParams, opts) 215 - if (data?.pages[0]) { 216 - lastFetchRef.current = data?.pages[0].fetchedAt 215 + const lastFetchedAt = data?.pages[0].fetchedAt 216 + if (lastFetchedAt) { 217 + lastFetchRef.current = lastFetchedAt 217 218 } 218 219 const isEmpty = React.useMemo( 219 220 () => !isFetching && !data?.pages?.some(page => page.slices.length), ··· 358 359 ...interstitial, 359 360 params: {variant}, 360 361 // overwrite key with unique value 361 - key: [interstitial.type, variant].join(':'), 362 + key: [interstitial.type, variant, lastFetchedAt].join(':'), 362 363 } 363 364 364 365 if (arr.length > interstitial.slot) { ··· 374 375 isFetched, 375 376 isError, 376 377 isEmpty, 378 + lastFetchedAt, 377 379 data, 378 380 feedUri, 379 381 feedIsDiscover,