Count on surfaces without provider too
This commit is contained in:
@@ -20,7 +20,15 @@ type StateContext = {
|
|||||||
|
|
||||||
const stateContext = React.createContext<StateContext>({
|
const stateContext = React.createContext<StateContext>({
|
||||||
enabled: false,
|
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) => {},
|
sendInteraction: (_interaction: AppBskyFeedDefs.Interaction) => {},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user