diff options
Diffstat (limited to 'src/view/com')
-rw-r--r-- | src/view/com/lists/ListMembers.tsx | 3 | ||||
-rw-r--r-- | src/view/com/profile/ProfileCard.tsx | 19 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/view/com/lists/ListMembers.tsx b/src/view/com/lists/ListMembers.tsx index 4a25c53e6..940761e31 100644 --- a/src/view/com/lists/ListMembers.tsx +++ b/src/view/com/lists/ListMembers.tsx @@ -64,6 +64,7 @@ export function ListMembers({ const { data, + dataUpdatedAt, isFetching, isFetched, isError, @@ -184,6 +185,7 @@ export function ListMembers({ (item as AppBskyGraphDefs.ListItemView).subject.handle }`} profile={(item as AppBskyGraphDefs.ListItemView).subject} + dataUpdatedAt={dataUpdatedAt} renderButton={renderMemberButton} style={{paddingHorizontal: isMobile ? 8 : 14, paddingVertical: 4}} /> @@ -196,6 +198,7 @@ export function ListMembers({ onPressTryAgain, onPressRetryLoadMore, isMobile, + dataUpdatedAt, ], ) diff --git a/src/view/com/profile/ProfileCard.tsx b/src/view/com/profile/ProfileCard.tsx index f7340fd6f..95f0ecd93 100644 --- a/src/view/com/profile/ProfileCard.tsx +++ b/src/view/com/profile/ProfileCard.tsx @@ -21,10 +21,13 @@ import { getProfileModerationCauses, getModerationCauseKey, } from 'lib/moderation' +import {useModerationOpts} from '#/state/queries/preferences' +import {useProfileShadow} from '#/state/cache/profile-shadow' -export const ProfileCard = observer(function ProfileCardImpl({ +export function ProfileCard({ testID, - profile, + profile: profileUnshadowed, + dataUpdatedAt, noBg, noBorder, followers, @@ -33,16 +36,20 @@ export const ProfileCard = observer(function ProfileCardImpl({ }: { testID?: string profile: AppBskyActorDefs.ProfileViewBasic + dataUpdatedAt: number noBg?: boolean noBorder?: boolean followers?: AppBskyActorDefs.ProfileView[] | undefined renderButton?: (profile: AppBskyActorDefs.ProfileViewBasic) => React.ReactNode style?: StyleProp<ViewStyle> }) { - const store = useStores() const pal = usePalette('default') - - const moderation = moderateProfile(profile, store.preferences.moderationOpts) + const profile = useProfileShadow(profileUnshadowed, dataUpdatedAt) + const moderationOpts = useModerationOpts() + if (!moderationOpts) { + return null + } + const moderation = moderateProfile(profile, moderationOpts) return ( <Link @@ -100,7 +107,7 @@ export const ProfileCard = observer(function ProfileCardImpl({ <FollowersList followers={followers} /> </Link> ) -}) +} function ProfileCardPills({ followedBy, |