Don't highlight tags in composer yet (#1665)

zio/stable
Eric Bailey 2023-10-10 15:44:27 -05:00 committed by GitHub
parent d68b4ca856
commit fc28fc639f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 10 deletions

View File

@ -187,16 +187,19 @@ export const TextInput = forwardRef(function TextInputImpl(
const textDecorated = useMemo(() => { const textDecorated = useMemo(() => {
let i = 0 let i = 0
return Array.from(richtext.segments()).map(segment => ( return Array.from(richtext.segments()).map(segment => {
<Text const isTag = AppBskyRichtextFacet.isTag(segment.facet?.features?.[0])
key={i++} return (
style={[ <Text
!segment.facet ? pal.text : pal.link, key={i++}
styles.textInputFormatting, style={[
]}> segment.facet && !isTag ? pal.link : pal.text,
{segment.text} styles.textInputFormatting,
</Text> ]}>
)) {segment.text}
</Text>
)
})
}, [richtext, pal.link, pal.text]) }, [richtext, pal.link, pal.text])
return ( return (