diff options
author | Ashm Walia <ashmwalia@outlook.com> | 2021-01-27 08:29:56 -0800 |
---|---|---|
committer | Ashm Walia <ashmwalia@outlook.com> | 2021-01-27 08:29:56 -0800 |
commit | 2f5f9df6dec1e905f3abf37d124ecd92d0e3a3d9 (patch) | |
tree | 0b34914b1af54c66031808c52da65395b7905fff /src/screens | |
parent | 85c0f668665696ba8127ee1ea436d10ec0af955f (diff) |
Pre-final
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/profile/MomentCommentsScreen.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
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<MomentCommentsScreenProps> = ({route}) => { const navigation = useNavigation(); const {moment_id, screenType} = route.params; + //Receives comment length from child CommentsContainer const [commentsLength, setCommentsLength] = useState<number>(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<MomentCommentsScreenProps> = ({route}) => { objectId={ commentObjectInFocus ? commentObjectInFocus.comment_id : moment_id } - isThreadInFocus={commentObjectInFocus ? true : false} + isCommentInFocus={commentObjectInFocus ? true : false} /> </View> </SafeAreaView> |