From 46cc8a33fe206c2c3bbd781374e727c1a42b9094 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 10 May 2021 20:00:21 -0400 Subject: fixed minor issues --- src/components/comments/CommentTile.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/components/comments') diff --git a/src/components/comments/CommentTile.tsx b/src/components/comments/CommentTile.tsx index a31c5b51..d028ceea 100644 --- a/src/components/comments/CommentTile.tsx +++ b/src/components/comments/CommentTile.tsx @@ -1,4 +1,4 @@ -import {useNavigation} from '@react-navigation/native'; +import {CommonActions, useNavigation} from '@react-navigation/native'; import React, {Fragment, useContext, useEffect, useRef, useState} from 'react'; import {Alert, Animated, StyleSheet} from 'react-native'; import {Text, View} from 'react-native-animatable'; @@ -55,6 +55,7 @@ const CommentTile: React.FC = ({ const [showReplies, setShowReplies] = useState(false); const [showKeyboard, setShowKeyboard] = useState(false); const [shouldUpdateChild, setShouldUpdateChild] = useState(true); + const [forceRerender, setForceRerender] = useState(0); const swipeRef = useRef(null); const {replyPosted} = useSelector((state: RootState) => state.user); const state: RootState = useStore().getState(); @@ -151,7 +152,10 @@ const CommentTile: React.FC = ({ /> handleLikeUnlikeComment(commentObject)} + onPress={() => { + handleLikeUnlikeComment(commentObject); + setShouldUpdateParent(true); + }} style={styles.likeButton} /> -- cgit v1.2.3-70-g09d2