Fix ReportDialog Android hang by narrowing dependency arrays

Replace `props` with specific property references (props.subject,
props.control, props.onAfterSubmit) in useMemo/useCallback deps to
prevent unnecessary recomputation on every render, which caused ~15s
hangs when tapping "Misleading" on Android.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
vineyardbovines
2026-04-03 16:00:08 -04:00
parent be56066ee9
commit 96532531ff
@@ -184,7 +184,7 @@ function Inner(props: ReportDialogProps) {
) )
}) })
}, [ }, [
props, props.subject,
allLabelers, allLabelers,
state.selectedOption, state.selectedOption,
isBskyOnlyReason, isBskyOnlyReason,
@@ -241,7 +241,17 @@ function Inner(props: ReportDialogProps) {
} finally { } finally {
setPending(false) setPending(false)
} }
}, [_, submitReport, state, dispatch, props, setPending, setSuccess]) }, [
_,
submitReport,
state,
dispatch,
props.subject,
props.control,
props.onAfterSubmit,
setPending,
setSuccess,
])
useCallOnce(() => { useCallOnce(() => {
ax.metric('reportDialog:open', { ax.metric('reportDialog:open', {