Skip to content

Commit 1737549

Browse files
committed
fix: suppress actor name for IOU only if last actor is not CONCIERGE
1 parent c475261 commit 1737549

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/libs/OptionsListUtils/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,14 @@ function getLastActorDisplayName(lastActorDetails: Partial<PersonalDetails> | nu
437437
* Should show the last actor display name from last actor details.
438438
*/
439439
function shouldShowLastActorDisplayName(report: OnyxEntry<Report>, lastActorDetails: Partial<PersonalDetails> | null, lastAction: OnyxEntry<ReportAction>) {
440+
const reportID = report?.reportID;
441+
const lastReportAction = reportID ? lastVisibleReportActions[reportID] : lastAction;
442+
440443
if (
441444
!lastActorDetails ||
442445
reportUtilsIsSelfDM(report) ||
443446
(isDM(report) && lastActorDetails.accountID !== currentUserAccountID) ||
444-
(lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && lastAction?.childVisibleActionCount === 0) ||
447+
(lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && lastReportAction?.actorAccountID !== CONST.ACCOUNT_ID.CONCIERGE) ||
445448
(lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW &&
446449
Object.keys(report?.participants ?? {})?.some((participantID) => participantID === CONST.ACCOUNT_ID.MANAGER_MCTEST.toString()))
447450
) {

0 commit comments

Comments
 (0)