diff --git a/src/screens/Profile/components/ProfileSubpageHeader.tsx b/src/screens/Profile/components/ProfileSubpageHeader.tsx index 14b86cfbe9..366f934f6a 100644 --- a/src/screens/Profile/components/ProfileSubpageHeader.tsx +++ b/src/screens/Profile/components/ProfileSubpageHeader.tsx @@ -6,6 +6,7 @@ import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useHaptics} from '#/lib/haptics' +import {makeProfileLink} from '#/lib/routes/links' import {makeCustomFeedLink} from '#/lib/routes/links' import {shareUrl} from '#/lib/sharing' import {sanitizeHandle} from '#/lib/strings/handles' @@ -74,7 +75,7 @@ export function ProfileSubpageHeader({info}: {info: FeedSourceFeedInfo}) { const {mutateAsync: updateSavedFeeds, isPending: isUpdateFeedPending} = useUpdateSavedFeedsMutation() - const isPending = + const isFeedStateChangePending = isAddSavedFeedPending || isRemovePending || isUpdateFeedPending const savedFeedConfig = preferences?.savedFeeds?.find( f => f.value === info.uri, @@ -273,7 +274,7 @@ export function ProfileSubpageHeader({info}: {info: FeedSourceFeedInfo}) { - + @@ -339,13 +345,20 @@ function DialogInner({ setLikeUri, likeCount, reportDialogControl, + isPinned, + onTogglePinned, + isFeedStateChangePending, }: { info: FeedSourceFeedInfo likeUri: string setLikeUri: (uri: string) => void likeCount: number reportDialogControl: Dialog.DialogOuterProps['control'] + isPinned: boolean + onTogglePinned: () => void + isFeedStateChangePending: boolean }) { + const control = Dialog.useDialogContext() const t = useTheme() const {_} = useLingui() const {hasSession} = useSession() @@ -405,7 +418,23 @@ function DialogInner({ - By {sanitizeHandle(info.creatorHandle, '@')} + By{' '} + control.close()}> + {sanitizeHandle(info.creatorHandle, '@')} + @@ -423,26 +452,12 @@ function DialogInner({ - {typeof likeCount === 'number' && ( + style={[a.underline, t.atoms.text_contrast_medium]} + onPress={() => control.close()}> - - + {hasSession && ( + <> + + + + - - - + + + + + + Something wrong? Let us know. + + + + + + + )} ) }