diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7608fde70..203d3ade7 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -839,4 +839,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 0282022703ad578ab2d9afbf3147ba3b373b4311 -COCOAPODS: 1.11.3 +COCOAPODS: 1.11.2 diff --git a/src/components/comment/view/commentView.tsx b/src/components/comment/view/commentView.tsx index eda3b0d32..4eedee7d0 100644 --- a/src/components/comment/view/commentView.tsx +++ b/src/components/comment/view/commentView.tsx @@ -18,6 +18,8 @@ import { TextWithIcon } from '../../basicUIElements'; import styles from './commentStyles'; import { useAppSelector } from '../../../hooks'; import { OptionsModal } from '../../atoms'; +import { useDispatch } from 'react-redux'; +import { showReplyModal } from '../../../redux/actions/uiAction'; const CommentView = ({ avatarSize, @@ -43,6 +45,7 @@ const CommentView = ({ }) => { const intl = useIntl(); const actionSheet = useRef(null); + const dispatch = useDispatch(); const isMuted = useAppSelector(state => state.account.currentAccount.mutes?.indexOf(comment.author) > -1); const lastCacheUpdate = useAppSelector((state) => state.cache.lastUpdate); @@ -113,6 +116,13 @@ const CommentView = ({ setChildCount(childCount + 1); } + const _handleOnReplyPress = () => { + if (isLoggedIn) { + dispatch(showReplyModal(comment)); + } else { + console.log('Not LoggedIn'); + } + } const _renderReadMoreButton = () => ( @@ -218,7 +228,7 @@ const CommentView = ({ iconStyle={styles.leftIcon} style={styles.leftButton} name="comment-outline" - onPress={() => handleOnReplyPress && handleOnReplyPress(comment)} + onPress={_handleOnReplyPress} iconType="MaterialCommunityIcons" /> )}