Fix report dialog nesting
This commit is contained in:
@@ -59,7 +59,6 @@ export function ProfileSubpageHeader({info}: {info: FeedSourceFeedInfo}) {
|
|||||||
const {top} = useSafeAreaInsets()
|
const {top} = useSafeAreaInsets()
|
||||||
const infoControl = Dialog.useDialogControl()
|
const infoControl = Dialog.useDialogControl()
|
||||||
const playHaptic = useHaptics()
|
const playHaptic = useHaptics()
|
||||||
const reportDialogControl = useReportDialogControl()
|
|
||||||
|
|
||||||
const {data: preferences} = usePreferencesQuery()
|
const {data: preferences} = usePreferencesQuery()
|
||||||
|
|
||||||
@@ -317,22 +316,12 @@ export function ProfileSubpageHeader({info}: {info: FeedSourceFeedInfo}) {
|
|||||||
likeUri={likeUri}
|
likeUri={likeUri}
|
||||||
setLikeUri={setLikeUri}
|
setLikeUri={setLikeUri}
|
||||||
likeCount={likeCount}
|
likeCount={likeCount}
|
||||||
reportDialogControl={reportDialogControl}
|
|
||||||
isPinned={isPinned}
|
isPinned={isPinned}
|
||||||
onTogglePinned={onTogglePinned}
|
onTogglePinned={onTogglePinned}
|
||||||
isFeedStateChangePending={isFeedStateChangePending}
|
isFeedStateChangePending={isFeedStateChangePending}
|
||||||
/>
|
/>
|
||||||
</Dialog.ScrollableInner>
|
</Dialog.ScrollableInner>
|
||||||
</Dialog.Outer>
|
</Dialog.Outer>
|
||||||
|
|
||||||
<ReportDialog
|
|
||||||
control={reportDialogControl}
|
|
||||||
params={{
|
|
||||||
type: 'feedgen',
|
|
||||||
uri: info.uri,
|
|
||||||
cid: info.cid,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -342,7 +331,6 @@ function DialogInner({
|
|||||||
likeUri,
|
likeUri,
|
||||||
setLikeUri,
|
setLikeUri,
|
||||||
likeCount,
|
likeCount,
|
||||||
reportDialogControl,
|
|
||||||
isPinned,
|
isPinned,
|
||||||
onTogglePinned,
|
onTogglePinned,
|
||||||
isFeedStateChangePending,
|
isFeedStateChangePending,
|
||||||
@@ -351,16 +339,16 @@ function DialogInner({
|
|||||||
likeUri: string
|
likeUri: string
|
||||||
setLikeUri: (uri: string) => void
|
setLikeUri: (uri: string) => void
|
||||||
likeCount: number
|
likeCount: number
|
||||||
reportDialogControl: Dialog.DialogOuterProps['control']
|
|
||||||
isPinned: boolean
|
isPinned: boolean
|
||||||
onTogglePinned: () => void
|
onTogglePinned: () => void
|
||||||
isFeedStateChangePending: boolean
|
isFeedStateChangePending: boolean
|
||||||
}) {
|
}) {
|
||||||
const control = Dialog.useDialogContext()
|
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const playHaptic = useHaptics()
|
const playHaptic = useHaptics()
|
||||||
|
const control = Dialog.useDialogContext()
|
||||||
|
const reportDialogControl = useReportDialogControl()
|
||||||
const [rt, loading] = useRichText(info.description.text)
|
const [rt, loading] = useRichText(info.description.text)
|
||||||
const {mutateAsync: likeFeed, isPending: isLikePending} = useLikeMutation()
|
const {mutateAsync: likeFeed, isPending: isLikePending} = useLikeMutation()
|
||||||
const {mutateAsync: unlikeFeed, isPending: isUnlikePending} =
|
const {mutateAsync: unlikeFeed, isPending: isUnlikePending} =
|
||||||
@@ -522,6 +510,15 @@ function DialogInner({
|
|||||||
<ButtonIcon icon={CircleInfo} position="right" />
|
<ButtonIcon icon={CircleInfo} position="right" />
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
<ReportDialog
|
||||||
|
control={reportDialogControl}
|
||||||
|
params={{
|
||||||
|
type: 'feedgen',
|
||||||
|
uri: info.uri,
|
||||||
|
cid: info.cid,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user