Skip to content

Commit

Permalink
Merge pull request Expensify#56591 from software-mansion-labs/@zfurta…
Browse files Browse the repository at this point in the history
…k/wrap-when-name-too-long

Make the name wrapped when it's too long
  • Loading branch information
techievivek authored Feb 11, 2025
2 parents 3b490d7 + f8d14d0 commit 1652004
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/SelectionList/ChatListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Text from '@components/Text';
import TextLink from '@components/TextLink';
import TextWithTooltip from '@components/TextWithTooltip';
import useAnimatedHighlightStyle from '@hooks/useAnimatedHighlightStyle';
import useLocalize from '@hooks/useLocalize';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down Expand Up @@ -43,6 +44,7 @@ function ChatListItem<TItem extends ListItem>({
const styles = useThemeStyles();
const theme = useTheme();
const StyleUtils = useStyleUtils();
const {translate} = useLocalize();

const attachmentContextValue = {type: CONST.ATTACHMENT_TYPE.SEARCH};

Expand All @@ -58,7 +60,7 @@ function ChatListItem<TItem extends ListItem>({

const focusedBackgroundColor = styles.sidebarLinkActive.backgroundColor;
const hoveredBackgroundColor = styles.sidebarLinkHover?.backgroundColor ? styles.sidebarLinkHover.backgroundColor : theme.sidebar;
const mentionReportContextValue = useMemo(() => ({currentReportID: item?.reportID ?? '-1'}), [item.reportID]);
const mentionReportContextValue = useMemo(() => ({currentReportID: item?.reportID}), [item.reportID]);
const animatedHighlightStyle = useAnimatedHighlightStyle({
borderRadius: variables.componentBorderRadius,
shouldHighlight: item?.shouldAnimateInHighlight ?? false,
Expand Down Expand Up @@ -102,10 +104,11 @@ function ChatListItem<TItem extends ListItem>({
<AttachmentContext.Provider value={attachmentContextValue}>
<View style={styles.webViewStyles.tagStyles.ol}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mb3]}>
<Text style={styles.chatItemMessageHeaderPolicy}>In </Text>
<Text style={styles.chatItemMessageHeaderPolicy}>{translate('common.in')}&nbsp;</Text>
<TextLink
fontSize={variables.fontSizeSmall}
onPress={() => onSelectRow(item)}
numberOfLines={1}
>
{reportActionItem.reportName}
</TextLink>
Expand Down

0 comments on commit 1652004

Please sign in to comment.