From f1de7743719e9005cdb0c0af2cd172ed65d2ad30 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sun, 19 Jan 2025 17:34:56 +0000 Subject: [PATCH] animate text in both directions --- src/screens/VideoFeed/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 3963f3a7b7..8cf16eba15 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -862,15 +862,20 @@ function ExpandableRichTextView({ }) { const {height: screenHeight} = useSafeAreaFrame() const [expanded, setExpanded] = useState(false) + const [hasBeenExpanded, setHasBeenExpanded] = useState(false) const [constrained, setConstrained] = useState(false) const [contentHeight, setContentHeight] = useState(0) const {_} = useLingui() + if (expanded && !hasBeenExpanded) { + setHasBeenExpanded(true) + } + return ( { - if (expanded) { + if (hasBeenExpanded) { LayoutAnimation.configureNext({ duration: 500, update: {type: 'spring', springDamping: 0.6},