Skip to content

Commit

Permalink
Merge pull request #33634 from paultsimura/fix/33589-here-icon-green
Browse files Browse the repository at this point in the history
[CP Staging] fix: Make the "@here" mention icon green

(cherry picked from commit 52879e5)
  • Loading branch information
mountiny authored and OSBotify committed Dec 26, 2023
1 parent e8d7bdc commit 1d896a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/MentionSuggestions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useCallback} from 'react';
import {View} from 'react-native';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import getStyledTextArray from '@libs/GetStyledTextArray';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -30,7 +31,7 @@ type MentionSuggestionsProps = {
/** Array of suggested mentions */
mentions: Mention[];

/** Fired when the user selects an mention */
/** Fired when the user selects a mention */
onSelect: () => void;

/** Mention prefix that follows the @ sign */
Expand All @@ -41,7 +42,7 @@ type MentionSuggestionsProps = {
* When this value is false, the suggester will have a height of 2.5 items. When this value is true, the height can be up to 5 items. */
isMentionPickerLarge: boolean;

/** Meaures the parent container's position and dimensions. */
/** Measures the parent container's position and dimensions. */
measureParentContainer: () => void;
};

Expand All @@ -51,6 +52,7 @@ type MentionSuggestionsProps = {
const keyExtractor = (item: Mention) => item.alternateText;

function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSelect, isMentionPickerLarge, measureParentContainer = () => {}}: MentionSuggestionsProps) {
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
/**
Expand All @@ -70,6 +72,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
size={isIcon ? CONST.AVATAR_SIZE.MENTION_ICON : CONST.AVATAR_SIZE.SMALLER}
name={item.icons[0].name}
type={item.icons[0].type}
fill={theme.success}
fallbackIcon={item.icons[0].fallbackIcon}
/>
</View>
Expand Down Expand Up @@ -117,6 +120,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
styles.flex1,
styles.mentionSuggestionsDisplayName,
styles.mentionSuggestionsHandle,
theme.success,
StyleUtils,
],
);
Expand Down

0 comments on commit 1d896a5

Please sign in to comment.