remove jank animation

This commit is contained in:
Samuel Newman
2025-01-16 14:43:41 +00:00
committed by Eric Bailey
parent 02a6ec3eff
commit eac4a67533
+12 -8
View File
@@ -258,10 +258,12 @@ function YoloFeed() {
useFocusEffect( useFocusEffect(
useCallback(() => { useCallback(() => {
if (!players) { if (!players) {
// create players, set sources, start playing
updateVideoState() updateVideoState()
} }
return () => { return () => {
if (players) { if (players) {
// manually release players when offscreen
players.forEach(p => p.release()) players.forEach(p => p.release())
setPlayers(null) setPlayers(null)
} }
@@ -365,7 +367,13 @@ function VibeItem({
{backgroundColor: 'rgba(0, 0, 0, 0.8)'}, {backgroundColor: 'rgba(0, 0, 0, 0.8)'},
]}> ]}>
<Text <Text
style={[a.text_2xl, a.font_bold, a.text_center, a.leading_tight]}> style={[
a.text_2xl,
a.font_heavy,
a.text_center,
a.leading_tight,
a.mx_xl,
]}>
<Trans>Post has been deleted</Trans> <Trans>Post has been deleted</Trans>
</Text> </Text>
</View> </View>
@@ -582,15 +590,11 @@ function ExpandableRichTextView({
<ScrollView <ScrollView
scrollEnabled={expanded} scrollEnabled={expanded}
onContentSizeChange={(_w, h) => { onContentSizeChange={(_w, h) => {
if (contentHeight !== 0) { if (expanded) {
LayoutAnimation.configureNext( LayoutAnimation.configureNext({
h > contentHeight
? {
duration: 500, duration: 500,
update: {type: 'spring', springDamping: 0.6}, update: {type: 'spring', springDamping: 0.6},
} })
: LayoutAnimation.Presets.easeInEaseOut,
)
} }
setContentHeight(h) setContentHeight(h)
}} }}