Skip to content

Commit

Permalink
Merge pull request #39058 from Expensify/monil-fixLocalTimePolicyExpe…
Browse files Browse the repository at this point in the history
…nseChat

Fix user's time being displayed above compose box in policy expense chat reports
  • Loading branch information
Hayata Suenaga authored Mar 28, 2024
2 parents fd56f5a + d7f145e commit e1901c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,14 @@ function canShowReportRecipientLocalTime(personalDetails: OnyxCollection<Persona
const reportRecipient = personalDetails?.[reportRecipientAccountIDs[0]];
const reportRecipientTimezone = reportRecipient?.timezone ?? CONST.DEFAULT_TIME_ZONE;
const isReportParticipantValidated = reportRecipient?.validated ?? false;
return Boolean(!hasMultipleParticipants && !isChatRoom(report) && !isPolicyExpenseChat(report) && reportRecipient && reportRecipientTimezone?.selected && isReportParticipantValidated);
return Boolean(
!hasMultipleParticipants &&
!isChatRoom(report) &&
!isPolicyExpenseChat(getRootParentReport(report)) &&
reportRecipient &&
reportRecipientTimezone?.selected &&
isReportParticipantValidated,
);
}

/**
Expand Down

0 comments on commit e1901c0

Please sign in to comment.