animate text in both directions

This commit is contained in:
Samuel Newman
2025-01-19 17:34:56 +00:00
parent 13a299c5d9
commit f1de774371
+6 -1
View File
@@ -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 (
<ScrollView
scrollEnabled={expanded}
onContentSizeChange={(_w, h) => {
if (expanded) {
if (hasBeenExpanded) {
LayoutAnimation.configureNext({
duration: 500,
update: {type: 'spring', springDamping: 0.6},