about summary refs log tree commit diff
path: root/src/lib/custom-animations/CountWheel.tsx
diff options
context:
space:
mode:
authorkhuddite <khuddite@gmail.com>2024-11-06 07:36:31 -0500
committerGitHub <noreply@github.com>2024-11-06 12:36:31 +0000
commitf95acdc8363f78618517c999fdc4f10ab6c20fa2 (patch)
tree556488185dba2db4db1c66e9e1baf7a031aae4da /src/lib/custom-animations/CountWheel.tsx
parent206df2ab801d211a412f9ce3694d90bdd053caaa (diff)
downloadvoidsky-f95acdc8363f78618517c999fdc4f10ab6c20fa2.tar.zst
Fix thin red circle around Like button on iOS (#6123)
* remove animation UI from DOM tree when not animated

* improve naming of vars

* more var changes

---------

Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/lib/custom-animations/CountWheel.tsx')
-rw-r--r--src/lib/custom-animations/CountWheel.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/custom-animations/CountWheel.tsx b/src/lib/custom-animations/CountWheel.tsx
index b4ca62c6e..b448ad227 100644
--- a/src/lib/custom-animations/CountWheel.tsx
+++ b/src/lib/custom-animations/CountWheel.tsx
@@ -91,15 +91,15 @@ export function CountWheel({
   likeCount,
   big,
   isLiked,
-  isToggle,
+  hasBeenToggled,
 }: {
   likeCount: number
   big?: boolean
   isLiked: boolean
-  isToggle: boolean
+  hasBeenToggled: boolean
 }) {
   const t = useTheme()
-  const shouldAnimate = !useReducedMotion() && isToggle
+  const shouldAnimate = !useReducedMotion() && hasBeenToggled
   const shouldRoll = decideShouldRoll(isLiked, likeCount)
 
   // Incrementing the key will cause the `Animated.View` to re-render, with the newly selected entering/exiting