Skip to content

Commit

Permalink
fix: apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Nov 23, 2023
1 parent 519c08c commit 4e398e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ function getAllReportErrors(report, reportActions) {

/**
* Get the preview message to be displayed in the option list.
*
* @param {Object} report
* @param {Object} reportAction
* @param {Boolean} [isPreviewMessageForParentChatReport]
* @returns {String}
*/

function getReportPreviewMessageForOptionList(report, reportAction, isPreviewMessageForParentChatReport = false) {
// for the request action preview we want to show the requestor instead of the user who owes the money
// For the request action preview we want to show the requestor instead of the user who owes the money
if (!isPreviewMessageForParentChatReport && reportAction.originalMessage && reportAction.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE) {
const amount = Math.abs(reportAction.originalMessage.amount);
const formattedAmount = CurrencyUtils.convertToDisplayString(amount, report.currency);
Expand Down
5 changes: 2 additions & 3 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1838,10 +1838,9 @@ function getTransactionReportName(reportAction) {
* @param {Number} actorID
* @param {Boolean} [shouldShowWorkspaceName]
* @param {Boolean} [shouldUseShortForm]
* @param {Object} [policy]
* @returns {String}
* @param {Object|undefined} [policy]
* @returns {String}
*/

function getActorNameForPreviewMessage({report, actorID, shouldShowWorkspaceName = false, shouldUseShortForm = false, policy = undefined}) {
return shouldShowWorkspaceName ? getPolicyName(report, false, policy) : getDisplayNameForParticipant(actorID, shouldUseShortForm);
}
Expand Down

0 comments on commit 4e398e8

Please sign in to comment.