diff options
author | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-04-22 16:44:48 -0700 |
---|---|---|
committer | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-04-22 16:44:48 -0700 |
commit | dd0ccf25aaec5d0ef4a9e8a38e97cd8b03bad0a1 (patch) | |
tree | 182e4ecd75668b1ff62f435d88c35aa5c63e36fb /src | |
parent | 1f04e445e9d317bc141624a440a2c1e55f8704b3 (diff) |
Private Hotifix
Diffstat (limited to 'src')
-rw-r--r-- | src/components/common/BadgeDetailView.tsx | 2 | ||||
-rw-r--r-- | src/components/profile/Content.tsx | 8 | ||||
-rw-r--r-- | src/components/profile/ProfileHeader.tsx | 9 |
3 files changed, 16 insertions, 3 deletions
diff --git a/src/components/common/BadgeDetailView.tsx b/src/components/common/BadgeDetailView.tsx index 32cc7aa4..437b1914 100644 --- a/src/components/common/BadgeDetailView.tsx +++ b/src/components/common/BadgeDetailView.tsx @@ -78,7 +78,7 @@ const BadgeDetailView: React.FC<BadgeDetailModalProps> = ({ setTimeout(() => { setSelectedBadgesWithImage(badgesWithImage); setIsLoading(false); - }, 500); + }, 250); }, [selectedBadges]); const removeBadgeCell = async (badge: string) => { diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index c70d6df5..8298dc9a 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -145,7 +145,13 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => { <Cover {...{userXId, screenType}} /> <ProfileCutout /> <ProfileHeader - {...{userXId, screenType, handleBlockUnblock, isBlocked}} + {...{ + userXId, + screenType, + handleBlockUnblock, + isBlocked, + isPrivate: !canViewProfile(state, userXId, screenType), + }} /> <ProfileBody {...{ diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 9dc58501..494b33bd 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -17,6 +17,7 @@ type ProfileHeaderProps = { screenType: ScreenType; isBlocked: boolean; handleBlockUnblock: () => void; + isPrivate?: boolean; }; const ProfileHeader: React.FC<ProfileHeaderProps> = ({ @@ -24,6 +25,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ screenType, isBlocked, handleBlockUnblock, + isPrivate, }) => { const { profile: {name = '', university_class = 2021, university}, @@ -67,7 +69,12 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ )} <View style={styles.friendsAndUniversity}> <FriendsCount screenType={screenType} userXId={userXId} /> - <TouchableOpacity onPress={() => setBadgeViewVisible(true)}> + <TouchableOpacity + onPress={() => { + if (!isPrivate) { + setBadgeViewVisible(true); + } + }}> <UniversityIcon {...{university, university_class, needsShadow: true}} /> |