diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js --- a/native/chat/inner-text-message.react.js +++ b/native/chat/inner-text-message.react.js @@ -70,7 +70,6 @@ const boundColors = useColors(); const messageStyle = {}; - const textStyle = {}; let darkColor; if (isViewer) { const threadColor = item.threadInfo.color; @@ -81,9 +80,6 @@ messageStyle.backgroundColor = boundColors.listChatBubble; darkColor = activeTheme === 'dark'; } - textStyle.color = darkColor - ? colors.dark.listForegroundLabel - : colors.light.listForegroundLabel; const cornerStyle = getRoundedContainerStyle(filterCorners(allCorners, item)); @@ -95,6 +91,16 @@ const rules = useTextMessageMarkdownRules(darkColor); + const markdownStyles = React.useMemo(() => { + const textStyle = { + color: darkColor + ? colors.dark.listForegroundLabel + : colors.light.listForegroundLabel, + }; + + return [styles.text, textStyle]; + }, [darkColor]); + const message = ( @@ -105,7 +111,7 @@ style={[styles.message, cornerStyle]} animatedStyle={messageStyle} > - + {text}