From 2f5f9df6dec1e905f3abf37d124ecd92d0e3a3d9 Mon Sep 17 00:00:00 2001 From: Ashm Walia Date: Wed, 27 Jan 2021 08:29:56 -0800 Subject: Pre-final --- src/screens/profile/MomentCommentsScreen.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/screens') diff --git a/src/screens/profile/MomentCommentsScreen.tsx b/src/screens/profile/MomentCommentsScreen.tsx index 764b9228..58422f0f 100644 --- a/src/screens/profile/MomentCommentsScreen.tsx +++ b/src/screens/profile/MomentCommentsScreen.tsx @@ -30,8 +30,11 @@ const MomentCommentsScreen: React.FC = ({route}) => { const navigation = useNavigation(); const {moment_id, screenType} = route.params; + //Receives comment length from child CommentsContainer const [commentsLength, setCommentsLength] = useState(0); const [newCommentsAvailable, setNewCommentsAvailable] = React.useState(true); + + //Keeps track of the current comments object in focus so that the application knows which comment to post a reply to const [commentObjectInFocus, setCommentObjectInFocus] = useState< CommentType | undefined >(undefined); @@ -70,7 +73,7 @@ const MomentCommentsScreen: React.FC = ({route}) => { objectId={ commentObjectInFocus ? commentObjectInFocus.comment_id : moment_id } - isThreadInFocus={commentObjectInFocus ? true : false} + isCommentInFocus={commentObjectInFocus ? true : false} /> -- cgit v1.2.3-70-g09d2