diff options
author | dan <dan.abramov@gmail.com> | 2024-11-05 22:27:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-05 22:27:48 +0000 |
commit | 6b826fb88dd33fe594fd7bb631a90d1a1713d0df (patch) | |
tree | fb101391dc0a574c987d2726502f35a38c3823fa /src | |
parent | 84fb1b7f97af7cdcaac1049d2c843c421d50539a (diff) | |
download | voidsky-6b826fb88dd33fe594fd7bb631a90d1a1713d0df.tar.zst |
Lower feedfeedback seen threshold to 0.5s (#6127)
Diffstat (limited to 'src')
-rw-r--r-- | src/state/feed-feedback.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/List.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/List.web.tsx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/state/feed-feedback.tsx b/src/state/feed-feedback.tsx index 29f328a62..41579edc1 100644 --- a/src/state/feed-feedback.tsx +++ b/src/state/feed-feedback.tsx @@ -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, }), diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index 53b0547d4..0425514e4 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -110,7 +110,7 @@ function ListImpl<ItemT>( }, { itemVisiblePercentThreshold: 40, - minimumViewTime: 1.5e3, + minimumViewTime: 0.5e3, }, ] }, [onItemSeen]) diff --git a/src/view/com/util/List.web.tsx b/src/view/com/util/List.web.tsx index d35ac1476..59a79b531 100644 --- a/src/view/com/util/List.web.tsx +++ b/src/view/com/util/List.web.tsx @@ -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" |