From b9c9895c45158b3db52e07114ad4305d85e803ea Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 28 Nov 2022 10:40:25 -0600 Subject: [PATCH] Slow down and enlarge post-ctrl animations (close #11) --- src/view/com/util/PostCtrls.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view/com/util/PostCtrls.tsx b/src/view/com/util/PostCtrls.tsx index 36a67b53..10b54be3 100644 --- a/src/view/com/util/PostCtrls.tsx +++ b/src/view/com/util/PostCtrls.tsx @@ -31,17 +31,17 @@ export function PostCtrls(opts: PostCtrlsOpts) { const interp2 = useSharedValue(0) const anim1Style = useAnimatedStyle(() => ({ - transform: [{scale: interpolate(interp1.value, [0, 1.0], [1.0, 3.0])}], + transform: [{scale: interpolate(interp1.value, [0, 1.0], [1.0, 4.0])}], opacity: interpolate(interp1.value, [0, 1.0], [1.0, 0.0]), })) const anim2Style = useAnimatedStyle(() => ({ - transform: [{scale: interpolate(interp2.value, [0, 1.0], [1.0, 3.0])}], + transform: [{scale: interpolate(interp2.value, [0, 1.0], [1.0, 4.0])}], opacity: interpolate(interp2.value, [0, 1.0], [1.0, 0.0]), })) const onPressToggleRepostWrapper = () => { if (!opts.isReposted) { - interp1.value = withTiming(1, {duration: 300}, () => { + interp1.value = withTiming(1, {duration: 400}, () => { interp1.value = withDelay(100, withTiming(0, {duration: 20})) }) } @@ -49,7 +49,7 @@ export function PostCtrls(opts: PostCtrlsOpts) { } const onPressToggleUpvoteWrapper = () => { if (!opts.isUpvoted) { - interp2.value = withTiming(1, {duration: 300}, () => { + interp2.value = withTiming(1, {duration: 400}, () => { interp2.value = withDelay(100, withTiming(0, {duration: 20})) }) }