Skip to content

Commit

Permalink
Merge pull request #37330 from Expensify/revert-36464-fix/35934
Browse files Browse the repository at this point in the history
(cherry picked from commit fa8051c)
  • Loading branch information
blimpich authored and OSBotify committed Feb 27, 2024
1 parent 4342cc3 commit 2ca76d3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1475,11 +1475,9 @@ function getIconsForParticipants(participants: number[], personalDetails: OnyxCo
*/
function getWorkspaceIcon(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = null): Icon {
const workspaceName = getPolicyName(report, false, policy);
const rootParentReport = getRootParentReport(report);
const hasCustomAvatar =
!(isEmptyObject(rootParentReport) || isDefaultRoom(rootParentReport) || isChatRoom(rootParentReport) || isArchivedRoom(rootParentReport)) &&
allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar;
const policyExpenseChatAvatarSource = hasCustomAvatar ? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar : getDefaultWorkspaceAvatar(workspaceName);
const policyExpenseChatAvatarSource = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar
? allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatar
: getDefaultWorkspaceAvatar(workspaceName);

const workspaceIcon: Icon = {
source: policyExpenseChatAvatarSource ?? '',
Expand Down

0 comments on commit 2ca76d3

Please sign in to comment.