diff --git a/src/components/postView/view/postDisplayView.js b/src/components/postView/view/postDisplayView.js index f3dc02bfd..172f1dd6a 100644 --- a/src/components/postView/view/postDisplayView.js +++ b/src/components/postView/view/postDisplayView.js @@ -24,6 +24,8 @@ import styles from './postDisplayStyles'; import { OptionsModal } from '../../atoms'; import { QuickReplyModal } from '../..'; import getWindowDimensions from '../../../utils/getWindowDimensions'; +import { useAppDispatch } from '../../../hooks'; +import { showReplyModal } from '../../../redux/actions/uiAction'; const HEIGHT = getWindowDimensions().height; const WIDTH = getWindowDimensions().width; @@ -47,6 +49,7 @@ const PostDisplayView = ({ reblogs, activeVotesCount, }) => { + const dispatch = useAppDispatch(); const insets = useSafeAreaInsets(); const [postHeight, setPostHeight] = useState(0); @@ -58,8 +61,6 @@ const PostDisplayView = ({ const [postBodyLoading, setPostBodyLoading] = useState(false); const [tags, setTags] = useState([]); - const quickReplyModalRef = useRef(null); - // Component Life Cycles useEffect(() => { if (isLoggedIn && get(currentAccount, 'name') && !isNewPost) { @@ -210,7 +211,7 @@ const PostDisplayView = ({ // show quick reply modal const _showQuickReplyModal = (post) => { if (isLoggedIn) { - quickReplyModalRef.current.show(post); + dispatch(showReplyModal(post)); } else { console.log('Not LoggedIn'); } @@ -283,7 +284,6 @@ const PostDisplayView = ({ cancelButtonIndex={1} onPress={(index) => (index === 0 ? handleOnRemovePress(get(post, 'permlink')) : null)} /> - ); };