diff options
author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2020-10-27 17:36:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 20:36:03 -0400 |
commit | 62d6fe2bca4bdd1a48cfe54e4c0c3fe590c3b750 (patch) | |
tree | 3afb2c723a10a2649c298e226bc31e10cec92d5a /src/components/profile/ProfilePreview.tsx | |
parent | 795ba089207571ec13226f2d07c149c8697763ce (diff) |
[HOT FIX] Refactor to make things clean and make the app work (#82)
* Refactored
* Final refactor with an issue
* It works
* Whoops
Diffstat (limited to 'src/components/profile/ProfilePreview.tsx')
-rw-r--r-- | src/components/profile/ProfilePreview.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/profile/ProfilePreview.tsx b/src/components/profile/ProfilePreview.tsx index ec0be50c..6848f993 100644 --- a/src/components/profile/ProfilePreview.tsx +++ b/src/components/profile/ProfilePreview.tsx @@ -39,7 +39,9 @@ const ProfilePreview: React.FC<ProfilePreviewProps> = ({ style, }) => { const navigation = useNavigation(); - const {loadProfile, updateMoments} = useContext(ProfileContext); + const {loadProfile, updateMoments, updateFollowers} = useContext( + ProfileContext, + ); const [avatarURI, setAvatarURI] = useState<string | null>(null); const [user, setUser] = useState<UserType>(NO_USER); useEffect(() => { @@ -131,6 +133,7 @@ const ProfilePreview: React.FC<ProfilePreviewProps> = ({ //Set new moments to true makes sure that we download the moment for the user being viewed again. loadProfile(user.id, user.username); updateMoments(true); + updateFollowers(true); if (!isComment) { navigation.push('Profile', { isProfileView: true, |