Skip to content

Commit

Permalink
Lower feedfeedback seen threshold to 0.5s (#6127)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Nov 5, 2024
1 parent 84fb1b7 commit 6b826fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/state/feed-feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function useFeedFeedback(feed: FeedDescriptor, hasSession: boolean) {

const sendToFeed = React.useMemo(
() =>
throttle(sendToFeedNoDelay, 15e3, {
throttle(sendToFeedNoDelay, 10e3, {
leading: false,
trailing: true,
}),
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/util/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function ListImpl<ItemT>(
},
{
itemVisiblePercentThreshold: 40,
minimumViewTime: 1.5e3,
minimumViewTime: 0.5e3,
},
]
}, [onItemSeen])
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/util/List.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type ListProps<ItemT> = Omit<
}
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 = {
rootMargin: '-200px 0px -200px 0px',
} // post must be 200px visible to be "seen"
Expand Down

0 comments on commit 6b826fb

Please sign in to comment.