Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

only open tag menu on long press (#3553)

authored by

Samuel Newman and committed by
GitHub
b09903e3 bcd88b08

+13 -3
+13 -3
src/components/RichText.tsx
··· 2 2 import {AppBskyRichtextFacet, RichText as RichTextAPI} from '@atproto/api' 3 3 import {msg} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 + import {useNavigation} from '@react-navigation/native' 5 6 7 + import {NavigationProp} from '#/lib/routes/types' 6 8 import {toShortUrl} from '#/lib/strings/url-helpers' 7 9 import {isNative} from '#/platform/detection' 8 10 import {atoms as a, flatten, native, TextStyleProp, useTheme, web} from '#/alf' ··· 178 180 onIn: onPressIn, 179 181 onOut: onPressOut, 180 182 } = useInteractionState() 183 + const navigation = useNavigation<NavigationProp>() 181 184 182 - const open = React.useCallback(() => { 185 + const navigateToPage = React.useCallback(() => { 186 + navigation.push('Hashtag', { 187 + tag: encodeURIComponent(tag), 188 + }) 189 + }, [navigation, tag]) 190 + 191 + const openDialog = React.useCallback(() => { 183 192 control.open() 184 193 }, [control]) 185 194 ··· 195 204 selectable={selectable} 196 205 {...native({ 197 206 accessibilityLabel: _(msg`Hashtag: #${tag}`), 198 - accessibilityHint: _(msg`Click here to open tag menu for #${tag}`), 207 + accessibilityHint: _(msg`Long press to open tag menu for #${tag}`), 199 208 accessibilityRole: isNative ? 'button' : undefined, 200 - onPress: open, 209 + onPress: navigateToPage, 210 + onLongPress: openDialog, 201 211 onPressIn: onPressIn, 202 212 onPressOut: onPressOut, 203 213 })}