about summary refs log tree commit diff
path: root/src/lib/custom-animations/CountWheel.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-09-03 10:55:53 -0700
committerGitHub <noreply@github.com>2024-09-03 10:55:53 -0700
commit0014d4363fa869389d7739ff9e3ffbbb03f5679c (patch)
treef3afc8371b16ad3c28c0c7d07a4b90479c518fc0 /src/lib/custom-animations/CountWheel.tsx
parentbd42f770b8b5144b6b292495a3193369fc726389 (diff)
downloadvoidsky-0014d4363fa869389d7739ff9e3ffbbb03f5679c.tar.zst
Only animate the like icon when from an actual toggle (#5096)
Diffstat (limited to 'src/lib/custom-animations/CountWheel.tsx')
-rw-r--r--src/lib/custom-animations/CountWheel.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/custom-animations/CountWheel.tsx b/src/lib/custom-animations/CountWheel.tsx
index 1a8676712..2e435f7d3 100644
--- a/src/lib/custom-animations/CountWheel.tsx
+++ b/src/lib/custom-animations/CountWheel.tsx
@@ -91,13 +91,15 @@ export function CountWheel({
   likeCount,
   big,
   isLiked,
+  isToggle,
 }: {
   likeCount: number
   big?: boolean
   isLiked: boolean
+  isToggle: boolean
 }) {
   const t = useTheme()
-  const shouldAnimate = !useReducedMotion()
+  const shouldAnimate = !useReducedMotion() && isToggle
   const shouldRoll = decideShouldRoll(isLiked, likeCount)
 
   // Incrementing the key will cause the `Animated.View` to re-render, with the newly selected entering/exiting