Lower feedfeedback seen threshold to 0.5s (#6127)

This commit is contained in:
dan
2024-11-05 22:27:48 +00:00
committed by GitHub
parent 84fb1b7f97
commit 6b826fb88d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ export function useFeedFeedback(feed: FeedDescriptor, hasSession: boolean) {
const sendToFeed = React.useMemo( const sendToFeed = React.useMemo(
() => () =>
throttle(sendToFeedNoDelay, 15e3, { throttle(sendToFeedNoDelay, 10e3, {
leading: false, leading: false,
trailing: true, trailing: true,
}), }),
+1 -1
View File
@@ -110,7 +110,7 @@ function ListImpl<ItemT>(
}, },
{ {
itemVisiblePercentThreshold: 40, itemVisiblePercentThreshold: 40,
minimumViewTime: 1.5e3, minimumViewTime: 0.5e3,
}, },
] ]
}, [onItemSeen]) }, [onItemSeen])
+1 -1
View File
@@ -28,7 +28,7 @@ export type ListProps<ItemT> = Omit<
} }
export type ListRef = React.MutableRefObject<any | null> // TODO: Better types. export type ListRef = React.MutableRefObject<any | null> // TODO: Better types.
const ON_ITEM_SEEN_WAIT_DURATION = 1.5e3 // when we consider post to be "seen" const ON_ITEM_SEEN_WAIT_DURATION = 0.5e3 // when we consider post to be "seen"
const ON_ITEM_SEEN_INTERSECTION_OPTS = { const ON_ITEM_SEEN_INTERSECTION_OPTS = {
rootMargin: '-200px 0px -200px 0px', rootMargin: '-200px 0px -200px 0px',
} // post must be 200px visible to be "seen" } // post must be 200px visible to be "seen"