From ab9472b976b089ba755b8d28837e53b1fa0c6e56 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Sat, 16 May 2026 00:35:21 +0200 Subject: [PATCH] Revert "fix(native/community): sync realtime-patched likes_count back into PostCard" This reverts commit 4c4792c153aa6949fc656ed570c0c147ba33ec87. --- apps/rebreak-native/components/PostCard.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/rebreak-native/components/PostCard.tsx b/apps/rebreak-native/components/PostCard.tsx index 0500a8b..8b6e6ce 100644 --- a/apps/rebreak-native/components/PostCard.tsx +++ b/apps/rebreak-native/components/PostCard.tsx @@ -30,14 +30,6 @@ function PostCardImpl({ post, onCommentPress }: Props) { const [localCount, setLocalCount] = useState(post.likesCount); const [isLiking, setIsLiking] = useState(false); - // Sync realtime-patched prop values into local state. Guarded by isLiking so - // an in-flight optimistic update is never clobbered by a concurrent patch. - useEffect(() => { - if (isLiking) return; - setLocalCount(post.likesCount); - setLocalLike(post.userLike === 'like' ? 'like' : null); - }, [post.likesCount, post.userLike, isLiking]); - // Heart-Pop Animation — Insta-Style: quick scale-up + spring-bounce back const heartScale = useRef(new Animated.Value(1)).current; const triggerHeartPop = useCallback(() => {