From 507b6f307f4aafcca7d0e943945a67f59001e34a Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 7 Jan 2026 18:46:06 -0600 Subject: [PATCH] Bug fix bug fix --- src/components/live/LiveStatusDialog.tsx | 24 ++++++++++++------- .../moderation/ReportDialog/index.tsx | 12 ++++------ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/live/LiveStatusDialog.tsx b/src/components/live/LiveStatusDialog.tsx index 2a8709e07b..1eb755773d 100644 --- a/src/components/live/LiveStatusDialog.tsx +++ b/src/components/live/LiveStatusDialog.tsx @@ -98,6 +98,7 @@ export function LiveStatus({ const openLink = useOpenLink() const moderationOpts = useModerationOpts() const reportDialogControl = useGlobalReportDialogControl() + const dialogContext = Dialog.useDialogContext() return ( <> @@ -217,21 +218,28 @@ export function LiveStatus({ a.flex_1, a.pt_sm, ]}> - + - + Live feature is in beta { - reportDialogControl.open({ - subject: { - ...profile.status, - $type: 'app.bsky.actor.defs#statusView', - }, - }) + function open() { + reportDialogControl.open({ + subject: { + ...profile.status, + $type: 'app.bsky.actor.defs#statusView', + }, + }) + } + if (dialogContext.isWithinDialog) { + dialogContext.close(open) + } else { + open() + } })} style={[a.text_sm, a.underline, t.atoms.text_contrast_medium]}> Report diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx index 1cd56af88e..f4cea4856a 100644 --- a/src/components/moderation/ReportDialog/index.tsx +++ b/src/components/moderation/ReportDialog/index.tsx @@ -55,21 +55,17 @@ export function useGlobalReportDialogControl() { const logger = Logger.create(Logger.Context.ReportDialog) export function GlobalReportDialog() { - const {value, control, clear} = useGlobalReportDialogControl() - if (!value) { - clear() - return null - } - return + const {value, control} = useGlobalReportDialogControl() + return } export function ReportDialog( props: Omit & { - subject: ReportSubject + subject?: ReportSubject }, ) { const subject = React.useMemo( - () => parseReportSubject(props.subject), + () => (props.subject ? parseReportSubject(props.subject) : undefined), [props.subject], ) const onClose = React.useCallback(() => {