removed post card item refresh on postsContainer refresh

I believe it was uanessacry post fetch as once the list is refreshed all posts in list will refresh no matter
This commit is contained in:
Nouman Tahir 2021-03-02 17:53:20 +05:00
parent f5ef2fe764
commit 3c9612c510
2 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ import { default as ROUTES } from '../../../constants/routeNames';
*/ */
const PostCardContainer = ({ const PostCardContainer = ({
isRefresh, // isRefresh,
navigation, navigation,
currentAccount, currentAccount,
content, content,
@ -32,14 +32,15 @@ const PostCardContainer = ({
const [reblogs, setReblogs] = useState([]); const [reblogs, setReblogs] = useState([]);
const [_content, setContent] = useState(content); const [_content, setContent] = useState(content);
useEffect(() => { // useEffect(() => {
if (isRefresh) { // if (isRefresh) {
_fetchPost(); // _fetchPost();
} // }
}, [isRefresh]); // }, [isRefresh]);
useEffect(() => { useEffect(() => {
let isCancelled = false; let isCancelled = false;
const fetchData = async (val) => { const fetchData = async (val) => {
try { try {
const dd = await getPostReblogs(val); const dd = await getPostReblogs(val);

View File

@ -72,7 +72,6 @@ export const parseComments = async (comments) => {
}); });
}; };
export const isVoted = async (activeVotes, currentUserName) => { export const isVoted = async (activeVotes, currentUserName) => {
if (!currentUserName) { if (!currentUserName) {
return false; return false;