From b43e256a831f6eedf039ebc5513dc3adb63dce3a Mon Sep 17 00:00:00 2001 From: Sadaqat Ali Date: Sat, 16 Apr 2022 13:11:33 +0500 Subject: [PATCH] added quick reply modal in comment reply --- src/components/comments/container/commentsContainer.js | 3 ++- src/components/commentsDisplay/view/commentsDisplayView.js | 2 ++ src/components/postView/view/postDisplayView.js | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js index 0c5e9919f..bb3b56c34 100644 --- a/src/components/comments/container/commentsContainer.js +++ b/src/components/comments/container/commentsContainer.js @@ -47,6 +47,7 @@ const CommentsContainer = ({ flatListProps, fetchedAt, incrementRepliesCount, + handleOnReplyPress, }) => { const lastCacheUpdate = useAppSelector((state) => state.cache.lastUpdate); const cachedComments = useAppSelector((state) => state.cache.comments); @@ -338,7 +339,7 @@ const CommentsContainer = ({ comments={lcomments.length > 0 ? lcomments : propComments} currentAccountUsername={currentAccount.name} handleOnEditPress={_handleOnEditPress} - handleOnReplyPress={_handleOnReplyPress} + handleOnReplyPress={handleOnReplyPress} isLoggedIn={isLoggedIn} fetchPost={fetchPost} handleDeleteComment={_handleDeleteComment} diff --git a/src/components/commentsDisplay/view/commentsDisplayView.js b/src/components/commentsDisplay/view/commentsDisplayView.js index 68ce2105f..6898b560b 100644 --- a/src/components/commentsDisplay/view/commentsDisplayView.js +++ b/src/components/commentsDisplay/view/commentsDisplayView.js @@ -18,6 +18,7 @@ const CommentsDisplayView = ({ permlink, mainAuthor, handleOnVotersPress, + handleOnReplyPress, fetchedAt, }) => { const [selectedFilter, setSelectedFilter] = useState('trending'); @@ -50,6 +51,7 @@ const CommentsDisplayView = ({ permlink={permlink} mainAuthor={mainAuthor} handleOnVotersPress={handleOnVotersPress} + handleOnReplyPress={handleOnReplyPress} fetchedAt={fetchedAt} /> diff --git a/src/components/postView/view/postDisplayView.js b/src/components/postView/view/postDisplayView.js index c0957e1b7..51636b0cd 100644 --- a/src/components/postView/view/postDisplayView.js +++ b/src/components/postView/view/postDisplayView.js @@ -208,7 +208,7 @@ const PostDisplayView = ({ // show quick reply modal const _showQuickReplyModal = (post) => { - // console.log('post: ', post); + // console.log('post in _showQuickReplyModal : ', post); if (isLoggedIn) { quickReplyModalRef.current.show(post); } else { @@ -266,6 +266,7 @@ const PostDisplayView = ({ commentCount={post.children} fetchPost={fetchPost} handleOnVotersPress={handleOnVotersPress} + handleOnReplyPress={_showQuickReplyModal} fetchedAt={post.post_fetched_at} /> )}