Fire the post:view client event in more places, anywhere a post can be seen (#9467)
* Fire the post:view client event in more places * Fix bad import --------- Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
|
||||
import {useCleanError} from '#/lib/hooks/useCleanError'
|
||||
import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
|
||||
import {usePostViewTracking} from '#/lib/hooks/usePostViewTracking'
|
||||
import {
|
||||
type CommonNavigatorParams,
|
||||
type NativeStackScreenProps,
|
||||
@@ -94,6 +95,7 @@ function BookmarksInner() {
|
||||
const initialNumToRender = useInitialNumToRender()
|
||||
const cleanError = useCleanError()
|
||||
const [isPTRing, setIsPTRing] = useState(false)
|
||||
const trackPostView = usePostViewTracking('Bookmarks')
|
||||
const {
|
||||
data,
|
||||
isLoading,
|
||||
@@ -176,6 +178,11 @@ function BookmarksInner() {
|
||||
onRefresh={onRefresh}
|
||||
onEndReached={onEndReached}
|
||||
onEndReachedThreshold={4}
|
||||
onItemSeen={item => {
|
||||
if (item.type === 'bookmark') {
|
||||
trackPostView(item.bookmark.item)
|
||||
}
|
||||
}}
|
||||
ListFooterComponent={
|
||||
<ListFooter
|
||||
isFetchingNextPage={isFetchingNextPage}
|
||||
|
||||
Reference in New Issue
Block a user