about summary refs log tree commit diff
path: root/src/view/com/profile
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/profile')
-rw-r--r--src/view/com/profile/ProfileCard.tsx9
-rw-r--r--src/view/com/profile/ProfileFollowers.tsx1
-rw-r--r--src/view/com/profile/ProfileFollows.tsx1
-rw-r--r--src/view/com/profile/ProfileHeader.tsx8
4 files changed, 16 insertions, 3 deletions
diff --git a/src/view/com/profile/ProfileCard.tsx b/src/view/com/profile/ProfileCard.tsx
index dfbc2ddbd..d14d5e16d 100644
--- a/src/view/com/profile/ProfileCard.tsx
+++ b/src/view/com/profile/ProfileCard.tsx
@@ -1,7 +1,7 @@
 import React from 'react'
 import {StyleSheet, View} from 'react-native'
 import {observer} from 'mobx-react-lite'
-import {AppBskyActorDefs} from '@atproto/api'
+import {AppBskyActorDefs, ComAtprotoLabelDefs} from '@atproto/api'
 import {Link} from '../util/Link'
 import {Text} from '../util/text/Text'
 import {UserAvatar} from '../util/UserAvatar'
@@ -17,6 +17,7 @@ export function ProfileCard({
   displayName,
   avatar,
   description,
+  labels,
   isFollowedBy,
   noBg,
   noBorder,
@@ -28,6 +29,7 @@ export function ProfileCard({
   displayName?: string
   avatar?: string
   description?: string
+  labels: ComAtprotoLabelDefs.Label[] | undefined
   isFollowedBy?: boolean
   noBg?: boolean
   noBorder?: boolean
@@ -50,7 +52,7 @@ export function ProfileCard({
       asAnchor>
       <View style={styles.layout}>
         <View style={styles.layoutAvi}>
-          <UserAvatar size={40} avatar={avatar} />
+          <UserAvatar size={40} avatar={avatar} hasWarning={!!labels?.length} />
         </View>
         <View style={styles.layoutContent}>
           <Text
@@ -114,6 +116,7 @@ export const ProfileCardWithFollowBtn = observer(
     displayName,
     avatar,
     description,
+    labels,
     isFollowedBy,
     noBg,
     noBorder,
@@ -124,6 +127,7 @@ export const ProfileCardWithFollowBtn = observer(
     displayName?: string
     avatar?: string
     description?: string
+    labels: ComAtprotoLabelDefs.Label[] | undefined
     isFollowedBy?: boolean
     noBg?: boolean
     noBorder?: boolean
@@ -138,6 +142,7 @@ export const ProfileCardWithFollowBtn = observer(
         displayName={displayName}
         avatar={avatar}
         description={description}
+        labels={labels}
         isFollowedBy={isFollowedBy}
         noBg={noBg}
         noBorder={noBorder}
diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx
index 0ef652a98..db592075a 100644
--- a/src/view/com/profile/ProfileFollowers.tsx
+++ b/src/view/com/profile/ProfileFollowers.tsx
@@ -67,6 +67,7 @@ export const ProfileFollowers = observer(function ProfileFollowers({
       handle={item.handle}
       displayName={item.displayName}
       avatar={item.avatar}
+      labels={item.labels}
       isFollowedBy={!!item.viewer?.followedBy}
     />
   )
diff --git a/src/view/com/profile/ProfileFollows.tsx b/src/view/com/profile/ProfileFollows.tsx
index 54b5a319a..10da79c5e 100644
--- a/src/view/com/profile/ProfileFollows.tsx
+++ b/src/view/com/profile/ProfileFollows.tsx
@@ -64,6 +64,7 @@ export const ProfileFollows = observer(function ProfileFollows({
       handle={item.handle}
       displayName={item.displayName}
       avatar={item.avatar}
+      labels={item.labels}
       isFollowedBy={!!item.viewer?.followedBy}
     />
   )
diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx
index 1326d3ec3..d520a712f 100644
--- a/src/view/com/profile/ProfileHeader.tsx
+++ b/src/view/com/profile/ProfileHeader.tsx
@@ -27,6 +27,7 @@ import {Text} from '../util/text/Text'
 import {RichText} from '../util/text/RichText'
 import {UserAvatar} from '../util/UserAvatar'
 import {UserBanner} from '../util/UserBanner'
+import {ProfileHeaderLabels} from '../util/moderation/ProfileHeaderLabels'
 import {usePalette} from 'lib/hooks/usePalette'
 import {useAnalytics} from 'lib/analytics'
 import {NavigationProp} from 'lib/routes/types'
@@ -320,6 +321,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoaded({
             richText={view.descriptionRichText}
           />
         ) : undefined}
+        <ProfileHeaderLabels labels={view.labels} />
         {view.viewer.muted ? (
           <View
             testID="profileHeaderMutedNotice"
@@ -348,7 +350,11 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoaded({
         onPress={onPressAvi}>
         <View
           style={[pal.view, {borderColor: pal.colors.background}, styles.avi]}>
-          <UserAvatar size={80} avatar={view.avatar} />
+          <UserAvatar
+            size={80}
+            avatar={view.avatar}
+            hasWarning={!!view.labels?.length}
+          />
         </View>
       </TouchableWithoutFeedback>
     </View>