fixing message color

This commit is contained in:
Roland Osborne 2025-03-14 10:19:35 -07:00
parent 29ba7cbc55
commit fa2905e82c

View File

@ -55,7 +55,7 @@ export function Message({ topic, card, profile, host, select, selected }: { topi
const words = parsed as string[]; const words = parsed as string[];
words.forEach((word, index) => { words.forEach((word, index) => {
if (!!urlPattern.test(word)) { if (!!urlPattern.test(word)) {
clickable.push(<Text key={index}>{ plain }</Text>); clickable.push(<Text key={index} style={textStyle}>{ plain }</Text>);
plain = ''; plain = '';
const url = !!hostPattern.test(word) ? word : `https://${word}`; const url = !!hostPattern.test(word) ? word : `https://${word}`;
clickable.push(<Text key={'link-' + index} onPress={() => Linking.openURL(sanitizeUrl(url))} style={{ fontStyle: 'italic' }}>{ sanitizeUrl(word) + ' ' }</Text>); clickable.push(<Text key={'link-' + index} onPress={() => Linking.openURL(sanitizeUrl(url))} style={{ fontStyle: 'italic' }}>{ sanitizeUrl(word) + ' ' }</Text>);
@ -67,7 +67,7 @@ export function Message({ topic, card, profile, host, select, selected }: { topi
} }
if (plain) { if (plain) {
clickable.push(<Text key={parsed.length}>{ plain }</Text>); clickable.push(<Text key={parsed.length} style={textStyle}>{ plain }</Text>);
} }
setMessage(clickable) setMessage(clickable)
}, [text, locked]); }, [text, locked]);