diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index f51610b1f1..d1f2fb969c 100644 --- a/src/components/Menu/index.tsx +++ b/src/components/Menu/index.tsx @@ -98,17 +98,17 @@ export function Trigger({ export function Outer({ children, showCancel, - disableTransition, + enableTransition, }: React.PropsWithChildren<{ showCancel?: boolean style?: StyleProp - disableTransition?: boolean + enableTransition?: boolean }>) { const context = useMenuContext() const {_} = useLingui() - const sourceViewTag = disableTransition - ? undefined - : (findNodeHandle(context.triggerRef.current) ?? undefined) + const sourceViewTag = enableTransition + ? (findNodeHandle(context.triggerRef.current) ?? undefined) + : undefined return ( { @@ -100,6 +102,7 @@ export function PostInteractionSettingsControlledDialog({ nativeOptions={{ preventExpansion: true, preventDismiss: rest.isDirty && rest.persist, + sourceViewTag, }} onClose={onClose}> diff --git a/src/screens/PostThread/components/HeaderDropdown.tsx b/src/screens/PostThread/components/HeaderDropdown.tsx index 5b5abca603..4e856d52a4 100644 --- a/src/screens/PostThread/components/HeaderDropdown.tsx +++ b/src/screens/PostThread/components/HeaderDropdown.tsx @@ -40,7 +40,7 @@ export function HeaderDropdown({ )} - + Show replies as diff --git a/src/view/com/composer/labels/LabelsBtn.tsx b/src/view/com/composer/labels/LabelsBtn.tsx index 0387315c9c..4c32a8f65b 100644 --- a/src/view/com/composer/labels/LabelsBtn.tsx +++ b/src/view/com/composer/labels/LabelsBtn.tsx @@ -1,4 +1,5 @@ -import {Keyboard, View} from 'react-native' +import {useRef} from 'react' +import {findNodeHandle, Keyboard, View} from 'react-native' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' import {Trans} from '@lingui/react/macro' @@ -29,6 +30,7 @@ export function LabelsBtn({ }) { const control = Dialog.useDialogControl() const {_} = useLingui() + const btnRef = useRef(null) const hasLabel = labels.length > 0 @@ -51,6 +53,7 @@ export function LabelsBtn({ return ( <> - + )} - + {dedupedHistory.map(historyItem => { const langCodes = historyItem.split(',') diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index ed22befcd9..f9f6f7c2e4 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -1,5 +1,11 @@ -import {useEffect, useMemo, useState} from 'react' -import {Keyboard, type StyleProp, type ViewStyle} from 'react-native' +import {useEffect, useMemo, useRef, useState} from 'react' +import { + findNodeHandle, + Keyboard, + type StyleProp, + type View, + type ViewStyle, +} from 'react-native' import {type AnimatedStyle} from 'react-native-reanimated' import {type AppBskyFeedPostgate} from '@atproto/api' import {msg} from '@lingui/core/macro' @@ -46,6 +52,7 @@ export function ThreadgateBtn({ const {_} = useLingui() const ax = useAnalytics() const control = Dialog.useDialogControl() + const btnRef = useRef(null) const [threadgateNudged, setThreadgateNudged] = useThreadgateNudged() const [showTooltip, setShowTooltip] = useState(false) const [tooltipWasShown] = useState(!threadgateNudged) @@ -145,6 +152,7 @@ export function ThreadgateBtn({ position="top">