From 38e9d86ee1c0941aa2786962defa7db4f4f49bc6 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 16 Jan 2025 14:43:41 +0000 Subject: [PATCH] remove jank animation --- src/screens/Feeds/VibeScreen.tsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/screens/Feeds/VibeScreen.tsx b/src/screens/Feeds/VibeScreen.tsx index 96f096f70d..a4f745ed75 100644 --- a/src/screens/Feeds/VibeScreen.tsx +++ b/src/screens/Feeds/VibeScreen.tsx @@ -258,10 +258,12 @@ function YoloFeed() { useFocusEffect( useCallback(() => { if (!players) { + // create players, set sources, start playing updateVideoState() } return () => { if (players) { + // manually release players when offscreen players.forEach(p => p.release()) setPlayers(null) } @@ -365,7 +367,13 @@ function VibeItem({ {backgroundColor: 'rgba(0, 0, 0, 0.8)'}, ]}> + style={[ + a.text_2xl, + a.font_heavy, + a.text_center, + a.leading_tight, + a.mx_xl, + ]}> Post has been deleted @@ -582,15 +590,11 @@ function ExpandableRichTextView({ { - if (contentHeight !== 0) { - LayoutAnimation.configureNext( - h > contentHeight - ? { - duration: 500, - update: {type: 'spring', springDamping: 0.6}, - } - : LayoutAnimation.Presets.easeInEaseOut, - ) + if (expanded) { + LayoutAnimation.configureNext({ + duration: 500, + update: {type: 'spring', springDamping: 0.6}, + }) } setContentHeight(h) }}