Skip to content

Commit

Permalink
Revert "fix/35934 | Workspaces - Сustom avatar is applied to all work…
Browse files Browse the repository at this point in the history
…space rooms"
  • Loading branch information
aldo-expensify authored Feb 27, 2024
1 parent 9d49ee5 commit d02e8ec
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 @@ -1483,11 +1483,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 d02e8ec

Please sign in to comment.