mirror of
https://github.com/tooot-app/app
synced 2025-03-12 17:40:19 +01:00
Update index.tsx
This commit is contained in:
parent
cdd80250d1
commit
0a99669af6
@ -136,16 +136,23 @@ const Timeline: React.FC<Props> = ({
|
|||||||
transform: [{ translateY: fetchedNoticeTop.value }]
|
transform: [{ translateY: fetchedNoticeTop.value }]
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
const refetchedNoticeBottom = useDerivedValue(() => {
|
||||||
|
if (firstLoad.value) {
|
||||||
|
return withSequence(
|
||||||
|
withTiming(0),
|
||||||
|
withDelay(
|
||||||
|
3000,
|
||||||
|
withTiming(fetchedNoticeHeight.value + 32, { easing: Easing.out(Easing.ease) })
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return fetchedNoticeHeight.value + 32
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
const refetchedNoticeAnimate = useAnimatedStyle(() => ({
|
const refetchedNoticeAnimate = useAnimatedStyle(() => ({
|
||||||
transform: [
|
transform: [
|
||||||
{
|
{
|
||||||
translateY: withSequence(
|
translateY: refetchedNoticeBottom.value
|
||||||
withTiming(0),
|
|
||||||
withDelay(
|
|
||||||
3000,
|
|
||||||
withTiming(fetchedNoticeHeight.value + 32, { easing: Easing.out(Easing.ease) })
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user