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:
Alex Benzer
2025-12-05 10:32:19 -08:00
committed by GitHub
parent db81cefb86
commit 9a0cb09d3a
10 changed files with 120 additions and 3 deletions
+3
View File
@@ -8,6 +8,7 @@ import {type NativeStackScreenProps} from '@react-navigation/native-stack'
import {HITSLOP_10} from '#/lib/constants'
import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
import {usePostViewTracking} from '#/lib/hooks/usePostViewTracking'
import {type CommonNavigatorParams} from '#/lib/routes/types'
import {shareUrl} from '#/lib/sharing'
import {cleanError} from '#/lib/strings/errors'
@@ -135,6 +136,7 @@ function TopicScreenTab({
const {_} = useLingui()
const initialNumToRender = useInitialNumToRender()
const [isPTR, setIsPTR] = React.useState(false)
const trackPostView = usePostViewTracking('Topic')
const {
data,
@@ -186,6 +188,7 @@ function TopicScreenTab({
onRefresh={onRefresh}
onEndReached={onEndReached}
onEndReachedThreshold={4}
onItemSeen={trackPostView}
// @ts-ignore web only -prf
desktopFixedHeight
ListFooterComponent={