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 => {
const isTag = AppBskyRichtextFacet.isTag(segment.facet?.features?.[0])
return (
<Text <Text
key={i++} key={i++}
style={[ style={[
!segment.facet ? pal.text : pal.link, segment.facet && !isTag ? pal.link : pal.text,
styles.textInputFormatting, styles.textInputFormatting,
]}> ]}>
{segment.text} {segment.text}
</Text> </Text>
)) )
})
}, [richtext, pal.link, pal.text]) }, [richtext, pal.link, pal.text])
return ( return (