added quick reply modal in comment reply

This commit is contained in:
Sadaqat Ali 2022-04-16 13:11:33 +05:00
parent 3ff04b5adb
commit b43e256a83
3 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,7 @@ const CommentsContainer = ({
flatListProps, flatListProps,
fetchedAt, fetchedAt,
incrementRepliesCount, incrementRepliesCount,
handleOnReplyPress,
}) => { }) => {
const lastCacheUpdate = useAppSelector((state) => state.cache.lastUpdate); const lastCacheUpdate = useAppSelector((state) => state.cache.lastUpdate);
const cachedComments = useAppSelector((state) => state.cache.comments); const cachedComments = useAppSelector((state) => state.cache.comments);
@ -338,7 +339,7 @@ const CommentsContainer = ({
comments={lcomments.length > 0 ? lcomments : propComments} comments={lcomments.length > 0 ? lcomments : propComments}
currentAccountUsername={currentAccount.name} currentAccountUsername={currentAccount.name}
handleOnEditPress={_handleOnEditPress} handleOnEditPress={_handleOnEditPress}
handleOnReplyPress={_handleOnReplyPress} handleOnReplyPress={handleOnReplyPress}
isLoggedIn={isLoggedIn} isLoggedIn={isLoggedIn}
fetchPost={fetchPost} fetchPost={fetchPost}
handleDeleteComment={_handleDeleteComment} handleDeleteComment={_handleDeleteComment}

View File

@ -18,6 +18,7 @@ const CommentsDisplayView = ({
permlink, permlink,
mainAuthor, mainAuthor,
handleOnVotersPress, handleOnVotersPress,
handleOnReplyPress,
fetchedAt, fetchedAt,
}) => { }) => {
const [selectedFilter, setSelectedFilter] = useState('trending'); const [selectedFilter, setSelectedFilter] = useState('trending');
@ -50,6 +51,7 @@ const CommentsDisplayView = ({
permlink={permlink} permlink={permlink}
mainAuthor={mainAuthor} mainAuthor={mainAuthor}
handleOnVotersPress={handleOnVotersPress} handleOnVotersPress={handleOnVotersPress}
handleOnReplyPress={handleOnReplyPress}
fetchedAt={fetchedAt} fetchedAt={fetchedAt}
/> />
</View> </View>

View File

@ -208,7 +208,7 @@ const PostDisplayView = ({
// show quick reply modal // show quick reply modal
const _showQuickReplyModal = (post) => { const _showQuickReplyModal = (post) => {
// console.log('post: ', post); // console.log('post in _showQuickReplyModal : ', post);
if (isLoggedIn) { if (isLoggedIn) {
quickReplyModalRef.current.show(post); quickReplyModalRef.current.show(post);
} else { } else {
@ -266,6 +266,7 @@ const PostDisplayView = ({
commentCount={post.children} commentCount={post.children}
fetchPost={fetchPost} fetchPost={fetchPost}
handleOnVotersPress={handleOnVotersPress} handleOnVotersPress={handleOnVotersPress}
handleOnReplyPress={_showQuickReplyModal}
fetchedAt={post.post_fetched_at} fetchedAt={post.post_fetched_at}
/> />
)} )}