Don't highlight tags in composer yet (#1665)
parent
d68b4ca856
commit
fc28fc639f
|
@ -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 (
|
||||||
|
|
Loading…
Reference in New Issue