diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-28 10:40:25 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-28 10:40:25 -0600 |
commit | b9c9895c45158b3db52e07114ad4305d85e803ea (patch) | |
tree | 28a9677c0b17fe1115f8878f7863f469e0263495 | |
parent | 0e6237e58c1d402efb2d4dee4c405cd545383ddb (diff) | |
download | voidsky-b9c9895c45158b3db52e07114ad4305d85e803ea.tar.zst |
Slow down and enlarge post-ctrl animations (close #11)
-rw-r--r-- | src/view/com/util/PostCtrls.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/com/util/PostCtrls.tsx b/src/view/com/util/PostCtrls.tsx index 36a67b53d..10b54be3f 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<number>(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})) }) } |