diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-27 12:38:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 12:38:23 -0500 |
commit | 1d50ddb378d5c6954d4cf8a6145b4486b9497107 (patch) | |
tree | 85a55e9aef6692c304cc31d7c3bb239c186f7951 /src/view/com/profile/ProfileHeader.tsx | |
parent | 51be8474db5e8074b1af233609b5eb455af31692 (diff) | |
download | voidsky-1d50ddb378d5c6954d4cf8a6145b4486b9497107.tar.zst |
Refactor moderation to apply to accounts, profiles, and posts correctly (#548)
* Add ScreenHider component * Add blur attribute to UserAvatar and UserBanner * Remove dead suggested posts component and model * Bump @atproto/api@0.2.10 * Rework moderation tooling to give a more precise DSL * Add label mocks * Apply finer grained moderation controls * Refactor ProfileCard to just take the profile object * Apply moderation to user listings and banner * Apply moderation to notifications * Fix lint * Tune avatar & banner blur settings per platform * 1.24
Diffstat (limited to 'src/view/com/profile/ProfileHeader.tsx')
-rw-r--r-- | src/view/com/profile/ProfileHeader.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index c295b2716..d1104d184 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -26,7 +26,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 {ProfileHeaderWarnings} from '../util/moderation/ProfileHeaderWarnings' import {usePalette} from 'lib/hooks/usePalette' import {useAnalytics} from 'lib/analytics' import {NavigationProp} from 'lib/routes/types' @@ -219,7 +219,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoaded({ ]) return ( <View style={pal.view}> - <UserBanner banner={view.banner} /> + <UserBanner banner={view.banner} moderation={view.moderation.avatar} /> <View style={styles.content}> <View style={[styles.buttonsLine]}> {isMe ? ( @@ -332,7 +332,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoaded({ richText={view.descriptionRichText} /> ) : undefined} - <ProfileHeaderLabels labels={view.labels} /> + <ProfileHeaderWarnings moderation={view.moderation.view} /> {view.viewer.muted ? ( <View testID="profileHeaderMutedNotice" @@ -364,7 +364,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoaded({ <UserAvatar size={80} avatar={view.avatar} - hasWarning={!!view.labels?.length} + moderation={view.moderation.avatar} /> </View> </TouchableWithoutFeedback> |