fix interval + decel rate on interstitials

This commit is contained in:
Samuel Newman
2025-01-17 23:10:28 +00:00
parent 17b5b7017e
commit 641cd9acef
2 changed files with 5 additions and 3 deletions
@@ -8,7 +8,7 @@ import {VIDEO_FEED_URI} from '#/lib/constants'
import {logEvent} from '#/lib/statsig/statsig' import {logEvent} from '#/lib/statsig/statsig'
import {useTrendingSettingsApi} from '#/state/preferences/trending' import {useTrendingSettingsApi} from '#/state/preferences/trending'
import {usePostFeedQuery} from '#/state/queries/post-feed' import {usePostFeedQuery} from '#/state/queries/post-feed'
import {atoms as a, useGutters, useTheme} from '#/alf' import {atoms as a, tokens, useGutters, useTheme} from '#/alf'
import {Button, ButtonIcon} from '#/components/Button' import {Button, ButtonIcon} from '#/components/Button'
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
import {Trending2_Stroke2_Corner2_Rounded as Graph} from '#/components/icons/Trending2' import {Trending2_Stroke2_Corner2_Rounded as Graph} from '#/components/icons/Trending2'
@@ -75,7 +75,8 @@ export function TrendingVideos() {
<ScrollView <ScrollView
horizontal horizontal
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
snapToInterval={(CARD_WIDTH + a.gap_sm.gap) * 2}> decelerationRate="fast"
snapToInterval={CARD_WIDTH + tokens.space.sm}>
<View <View
style={[ style={[
a.flex_row, a.flex_row,
@@ -95,7 +95,8 @@ export function ExploreTrendingVideos() {
<ScrollView <ScrollView
horizontal horizontal
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
snapToInterval={(CARD_WIDTH + a.gap_sm.gap) * 2}> decelerationRate="fast"
snapToInterval={CARD_WIDTH + tokens.space.sm}>
<View <View
style={[ style={[
a.pt_lg, a.pt_lg,