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
  • Loading branch information
marcochavezf authored Mar 14, 2022
2 parents 5924623 + fbc8686 commit e4cad4c
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 @@ -263,6 +263,7 @@ function createOption(personalDetailList, report, {

const tooltipText = ReportUtils.getReportParticipantsTitle(lodashGet(report, ['participants'], []));
const subtitle = ReportUtils.getChatRoomSubtitle(report, policies);
let icons = getAvatarSources(report);
let text;
let alternateText;
if (isChatRoom || isPolicyExpenseChat) {
Expand All @@ -278,11 +279,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 e4cad4c

Please sign in to comment.