diff options
author | khuddite <khuddite@gmail.com> | 2024-11-06 07:36:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-06 12:36:31 +0000 |
commit | f95acdc8363f78618517c999fdc4f10ab6c20fa2 (patch) | |
tree | 556488185dba2db4db1c66e9e1baf7a031aae4da /src/view/com/util/post-ctrls/PostCtrls.tsx | |
parent | 206df2ab801d211a412f9ce3694d90bdd053caaa (diff) | |
download | voidsky-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/view/com/util/post-ctrls/PostCtrls.tsx')
-rw-r--r-- | src/view/com/util/post-ctrls/PostCtrls.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/view/com/util/post-ctrls/PostCtrls.tsx b/src/view/com/util/post-ctrls/PostCtrls.tsx index 2cc45617f..deb4b51d8 100644 --- a/src/view/com/util/post-ctrls/PostCtrls.tsx +++ b/src/view/com/util/post-ctrls/PostCtrls.tsx @@ -107,7 +107,8 @@ let PostCtrls = ({ [t], ) as StyleProp<ViewStyle> - const [isToggleLikeIcon, setIsToggleLikeIcon] = React.useState(false) + const [hasLikeIconBeenToggled, setHasLikeIconBeenToggled] = + React.useState(false) const onPressToggleLike = React.useCallback(async () => { if (isBlocked) { @@ -119,7 +120,7 @@ let PostCtrls = ({ } try { - setIsToggleLikeIcon(true) + setHasLikeIconBeenToggled(true) if (!post.viewer?.like) { playHaptic('Light') sendInteraction({ @@ -311,13 +312,13 @@ let PostCtrls = ({ <AnimatedLikeIcon isLiked={Boolean(post.viewer?.like)} big={big} - isToggle={isToggleLikeIcon} + hasBeenToggled={hasLikeIconBeenToggled} /> <CountWheel likeCount={post.likeCount ?? 0} big={big} isLiked={Boolean(post.viewer?.like)} - isToggle={isToggleLikeIcon} + hasBeenToggled={hasLikeIconBeenToggled} /> </Pressable> </View> |