Skip to content

Commit

Permalink
Merge pull request #8143 from Expensify/marco-fixInviteNewMemberAvatars
Browse files Browse the repository at this point in the history
fix avatars in search screen to invite new members

(cherry picked from commit e4cad4c)
  • Loading branch information
marcochavezf authored and OSBotify committed Mar 15, 2022
1 parent 49bdd12 commit a3dfc90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ function createOption(personalDetailList, report, {

const tooltipText = ReportUtils.getReportParticipantsTitle(getParticipants(report));
const subtitle = ReportUtils.getChatRoomSubtitle(report, policies);
let icons = getAvatarSources(report);
let text;
let alternateText;
if (isChatRoom || isPolicyExpenseChat) {
Expand All @@ -290,11 +291,15 @@ function createOption(personalDetailList, report, {
alternateText = (showChatPreviewLine && lastMessageText)
? lastMessageText
: Str.removeSMSDomain(personalDetail.login);
if (!report) {
// If the report doesn't exist then we're creating a list of users to invite (using the personalDetailList)
icons = [personalDetail.avatar];
}
}
return {
text,
alternateText,
icons: getAvatarSources(report),
icons,
tooltipText,
ownerEmail: lodashGet(report, ['ownerEmail']),
subtitle,
Expand Down

0 comments on commit a3dfc90

Please sign in to comment.