diff --git a/src/view/com/util/load-latest/LoadLatestBtn.tsx b/src/view/com/util/load-latest/LoadLatestBtn.tsx index f5d12ce2c1..095ebea448 100644 --- a/src/view/com/util/load-latest/LoadLatestBtn.tsx +++ b/src/view/com/util/load-latest/LoadLatestBtn.tsx @@ -10,6 +10,10 @@ import {colors} from 'lib/styles' import {HITSLOP_20} from 'lib/constants' import {isWeb} from 'platform/detection' import {clamp} from 'lib/numbers' +import Animated, {useAnimatedStyle, withTiming} from 'react-native-reanimated' + +const AnimatedTouchableOpacity = + Animated.createAnimatedComponent(TouchableOpacity) export const LoadLatestBtn = observer(function LoadLatestBtnImpl({ onPress, @@ -30,15 +34,18 @@ export const LoadLatestBtn = observer(function LoadLatestBtnImpl({ ? 50 : (minMode || isDesktop ? 16 : 60) + (isWeb ? 20 : clamp(safeAreaInsets.bottom, 15, 60)) + const animatedStyle = useAnimatedStyle(() => ({ + bottom: withTiming(bottom, {duration: 150}), + })) return ( - {showIndicator && } - + ) })