Skip to content

Commit

Permalink
Merge pull request #28274 from ZhenjaHorbach/split-number-keeps-on-ch…
Browse files Browse the repository at this point in the history
…anging-its-initials

Split Bill - Number keeps on changing its initials
  • Loading branch information
neil-marcellini committed Sep 29, 2023
2 parents 77148fb + 3b06da5 commit fbd04cf
Showing 1 changed file with 5 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ function MoneyRequestParticipantsSelector({
if (newChatOptions.userToInvite && !OptionsListUtils.isCurrentUser(newChatOptions.userToInvite)) {
newSections.push({
undefined,
data: [newChatOptions.userToInvite],
data: _.map([newChatOptions.userToInvite], (participant) => {
const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false);
return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails);
}),
shouldShow: true,
indexOffset,
});
Expand Down Expand Up @@ -201,30 +204,8 @@ function MoneyRequestParticipantsSelector({
}

onAddParticipants(newSelectedOptions);

const chatOptions = OptionsListUtils.getFilteredOptions(
reports,
personalDetails,
betas,
isOptionInList ? searchTerm : '',
newSelectedOptions,
CONST.EXPENSIFY_EMAILS,

// If we are using this component in the "Request money" flow then we pass the includeOwnedWorkspaceChats argument so that the current user
// sees the option to request money from their admin on their own Workspace Chat.
iouType === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST,

// We don't want to include any P2P options like personal details or reports that are not workspace chats for certain features.
!isDistanceRequest,
);

setNewChatOptions({
recentReports: chatOptions.recentReports,
personalDetails: chatOptions.personalDetails,
userToInvite: chatOptions.userToInvite,
});
},
[participants, onAddParticipants, reports, personalDetails, betas, searchTerm, iouType, isDistanceRequest],
[participants, onAddParticipants],
);

const headerMessage = OptionsListUtils.getHeaderMessage(
Expand Down

0 comments on commit fbd04cf

Please sign in to comment.