Count on surfaces without provider too

This commit is contained in:
Dan Abramov
2024-12-17 21:51:42 +00:00
parent b8d298a95d
commit 9ecdc487fb
+9 -1
View File
@@ -20,7 +20,15 @@ type StateContext = {
const stateContext = React.createContext<StateContext>({
enabled: false,
onItemSeen: (_item: any) => {},
onItemSeen: (feedItem: any) => {
const slice = getFeedPostSlice(feedItem)
if (slice === null) {
return
}
for (const postItem of slice.items) {
markGloballySeenPost(postItem.uri)
}
},
sendInteraction: (_interaction: AppBskyFeedDefs.Interaction) => {},
})