Merge branch 'bluesky-social:main' into patch-3

This commit is contained in:
Minseo Lee 2024-03-14 21:11:00 +09:00 committed by GitHub
commit 4813f26158
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 210 additions and 42 deletions

View file

@ -13,13 +13,18 @@ export function FollowButton({
followedType = 'default',
profile,
labelStyle,
logContext,
}: {
unfollowedType?: ButtonType
followedType?: ButtonType
profile: Shadow<AppBskyActorDefs.ProfileViewBasic>
labelStyle?: StyleProp<TextStyle>
logContext: 'ProfileCard'
}) {
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(profile)
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(
profile,
logContext,
)
const {_} = useLingui()
const onPressFollow = async () => {

View file

@ -230,7 +230,9 @@ export function ProfileCardWithFollowBtn({
renderButton={
isMe
? undefined
: profileShadow => <FollowButton profile={profileShadow} />
: profileShadow => (
<FollowButton profile={profileShadow} logContext="ProfileCard" />
)
}
/>
)

View file

@ -103,7 +103,10 @@ let ProfileHeader = ({
const invalidHandle = isInvalidHandle(profile.handle)
const {isDesktop} = useWebMediaQueries()
const [showSuggestedFollows, setShowSuggestedFollows] = React.useState(false)
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(profile)
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(
profile,
'ProfileHeader',
)
const [__, queueUnblock] = useProfileBlockMutationQueue(profile)
const unblockPromptControl = Prompt.usePromptControl()
const moderation = useMemo(

View file

@ -172,7 +172,10 @@ function SuggestedFollow({
const {_} = useLingui()
const moderationOpts = useModerationOpts()
const profile = useProfileShadow(profileUnshadowed)
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(profile)
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(
profile,
'ProfileHeaderSuggestedFollows',
)
const onPressFollow = React.useCallback(async () => {
try {

View file

@ -52,7 +52,10 @@ let ProfileMenu = ({
const [queueMute, queueUnmute] = useProfileMuteMutationQueue(profile)
const [queueBlock, queueUnblock] = useProfileBlockMutationQueue(profile)
const [, queueUnfollow] = useProfileFollowMutationQueue(profile)
const [, queueUnfollow] = useProfileFollowMutationQueue(
profile,
'ProfileMenu',
)
const blockPromptControl = Prompt.usePromptControl()