|
1 | 1 | import {useFocusEffect} from '@react-navigation/native';
|
| 2 | +import ExpensiMark from 'expensify-common/lib/ExpensiMark'; |
2 | 3 | import React, {useCallback, useRef, useState} from 'react';
|
3 | 4 | import type {GestureResponderEvent, ViewStyle} from 'react-native';
|
4 | 5 | import {StyleSheet, View} from 'react-native';
|
@@ -28,6 +29,8 @@ import CONST from '@src/CONST';
|
28 | 29 | import {isEmptyObject} from '@src/types/utils/EmptyObject';
|
29 | 30 | import type {OptionRowLHNProps} from './types';
|
30 | 31 |
|
| 32 | +const parser = new ExpensiMark(); |
| 33 | + |
31 | 34 | function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, optionItem, viewMode = 'default', style, onLayout = () => {}, hasDraftComment}: OptionRowLHNProps) {
|
32 | 35 | const theme = useTheme();
|
33 | 36 | const styles = useThemeStyles();
|
@@ -59,8 +62,8 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
|
59 | 62 | const textUnreadStyle = optionItem?.isUnread && optionItem.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE ? [textStyle, styles.sidebarLinkTextBold] : [textStyle];
|
60 | 63 | const displayNameStyle = [styles.optionDisplayName, styles.optionDisplayNameCompact, styles.pre, textUnreadStyle, style];
|
61 | 64 | const alternateTextStyle = isInFocusMode
|
62 |
| - ? [textStyle, styles.optionAlternateText, styles.pre, styles.textLabelSupporting, styles.optionAlternateTextCompact, styles.ml2, style] |
63 |
| - : [textStyle, styles.optionAlternateText, styles.pre, styles.textLabelSupporting, style]; |
| 65 | + ? [textStyle, styles.optionAlternateText, styles.textLabelSupporting, styles.optionAlternateTextCompact, styles.ml2, style] |
| 66 | + : [textStyle, styles.optionAlternateText, styles.textLabelSupporting, style]; |
64 | 67 |
|
65 | 68 | const contentContainerStyles = isInFocusMode ? [styles.flex1, styles.flexRow, styles.overflowHidden, StyleUtils.getCompactContentContainerStyles()] : [styles.flex1];
|
66 | 69 | const sidebarInnerRowStyle = StyleSheet.flatten<ViewStyle>(
|
@@ -221,7 +224,7 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
|
221 | 224 | numberOfLines={1}
|
222 | 225 | accessibilityLabel={translate('accessibilityHints.lastChatMessagePreview')}
|
223 | 226 | >
|
224 |
| - {optionItem.alternateText} |
| 227 | + {parser.htmlToText(optionItem.alternateText)} |
225 | 228 | </Text>
|
226 | 229 | ) : null}
|
227 | 230 | </View>
|
|
0 commit comments