Skip to content

Commit

Permalink
chore: update text rtl support
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Nov 21, 2024
1 parent 03b5bf3 commit f72d672
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const MessageBubbleWithText = ({
<Text body3 color={color.enabled.textMsg} suppressHighlighting supportRTLAlign originalText={message.message}>
<RegexText
body3
suppressHighlighting
supportRTLAlign
originalText={message.message}
color={color.enabled.textMsg}
patterns={[
...regexTextPatterns,
Expand All @@ -48,8 +51,6 @@ const MessageBubbleWithText = ({
onPress={() => onPressURL?.(match)}
onLongPress={onLongPress}
style={[parentProps?.style, styles.urlText]}
supportRTLAlign
originalText={match}
>
{match}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ const ThreadParentMessageUserOg = (props: Props) => {
return (
<Box>
<PressBox activeOpacity={0.85} onPress={onPressMessage(userMessage)}>
<Text body3 color={colors.onBackground01} suppressHighlighting>
<Text
body3
suppressHighlighting
supportRTLAlign
originalText={userMessage.message}
color={colors.onBackground01}
>
<RegexText
body3
suppressHighlighting
supportRTLAlign
originalText={userMessage.message}
color={colors.onBackground01}
patterns={[
...(props.regexTextPatterns ?? []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ const ThreadParentMessageUser = (props: Props) => {
const { colors } = useUIKitTheme();

return (
<Text body3 color={colors.onBackground01} suppressHighlighting>
<Text body3 color={colors.onBackground01} suppressHighlighting supportRTLAlign originalText={userMessage.message}>
<RegexText
body3
suppressHighlighting
supportRTLAlign
originalText={userMessage.message}
color={colors.onBackground01}
patterns={[
...(props.regexTextPatterns ?? []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const ThreadParentMessageRenderer = (props: ThreadParentMessageRendererProps) =>
color={mentionColor}
onPress={() => messageProps.onPressMentionedUser?.(user)}
onLongPress={messageProps.onLongPress}
suppressHighlighting
style={[
parentProps?.style,
{ fontWeight: '700' },
Expand Down

0 comments on commit f72d672

Please sign in to comment.