From f33f1749ccaba5f10d987aa7e09d1d236a8698c8 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 11 Dec 2024 13:45:55 -0600 Subject: [PATCH] Fix report dialog nesting --- .../components/ProfileSubpageHeader.tsx | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/screens/Profile/components/ProfileSubpageHeader.tsx b/src/screens/Profile/components/ProfileSubpageHeader.tsx index 56a610c532..be5f89fb3c 100644 --- a/src/screens/Profile/components/ProfileSubpageHeader.tsx +++ b/src/screens/Profile/components/ProfileSubpageHeader.tsx @@ -59,7 +59,6 @@ export function ProfileSubpageHeader({info}: {info: FeedSourceFeedInfo}) { const {top} = useSafeAreaInsets() const infoControl = Dialog.useDialogControl() const playHaptic = useHaptics() - const reportDialogControl = useReportDialogControl() const {data: preferences} = usePreferencesQuery() @@ -317,22 +316,12 @@ export function ProfileSubpageHeader({info}: {info: FeedSourceFeedInfo}) { likeUri={likeUri} setLikeUri={setLikeUri} likeCount={likeCount} - reportDialogControl={reportDialogControl} isPinned={isPinned} onTogglePinned={onTogglePinned} isFeedStateChangePending={isFeedStateChangePending} /> - - ) } @@ -342,7 +331,6 @@ function DialogInner({ likeUri, setLikeUri, likeCount, - reportDialogControl, isPinned, onTogglePinned, isFeedStateChangePending, @@ -351,16 +339,16 @@ function DialogInner({ 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() const playHaptic = useHaptics() + const control = Dialog.useDialogContext() + const reportDialogControl = useReportDialogControl() const [rt, loading] = useRichText(info.description.text) const {mutateAsync: likeFeed, isPending: isLikePending} = useLikeMutation() const {mutateAsync: unlikeFeed, isPending: isUnlikePending} = @@ -522,6 +510,15 @@ function DialogInner({ + + )}