Skip to content

Commit

Permalink
Merge pull request #50148 from Expensify/georgia-avatar-invoice
Browse files Browse the repository at this point in the history
[Invoice Avatar] Use Subscript Avatar for Invoice Reports/Previews
  • Loading branch information
bondydaa authored Oct 8, 2024
2 parents 5c9517e + 374c5c3 commit bdc3a15
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const CONST = {
},

// Note: Group and Self-DM excluded as these are not tied to a Workspace
WORKSPACE_ROOM_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL, chatTypes.POLICY_ROOM, chatTypes.POLICY_EXPENSE_CHAT],
WORKSPACE_ROOM_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL, chatTypes.POLICY_ROOM, chatTypes.POLICY_EXPENSE_CHAT, chatTypes.INVOICE],
ANDROID_PACKAGE_NAME,
WORKSPACE_ENABLE_FEATURE_REDIRECT_DELAY: 100,
ANIMATED_HIGHLIGHT_ENTRY_DELAY: 50,
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6940,7 +6940,7 @@ function shouldReportShowSubscript(report: OnyxEntry<Report>): boolean {
return true;
}

if (isInvoiceRoom(report)) {
if (isInvoiceRoom(report) || isInvoiceReport(report)) {
return true;
}

Expand Down
18 changes: 9 additions & 9 deletions src/pages/home/report/ReportActionItemSingle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@ function ReportActionItemSingle({
);

const getAvatar = () => {
if (shouldShowSubscriptAvatar) {
return (
<SubscriptAvatar
mainAvatar={icon}
secondaryAvatar={secondaryAvatar}
noMargin
/>
);
}
if (displayAllActors) {
return (
<MultipleAvatars
Expand All @@ -203,15 +212,6 @@ function ReportActionItemSingle({
/>
);
}
if (shouldShowSubscriptAvatar) {
return (
<SubscriptAvatar
mainAvatar={icon}
secondaryAvatar={secondaryAvatar}
noMargin
/>
);
}
return (
<UserDetailsTooltip
accountID={Number(actorAccountID ?? -1)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionsListItemRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function ReportActionsListItemRenderer({
displayAsGroup={displayAsGroup}
shouldDisplayNewMarker={shouldDisplayNewMarker}
shouldShowSubscriptAvatar={
ReportUtils.isPolicyExpenseChat(report) &&
(ReportUtils.isPolicyExpenseChat(report) || ReportUtils.isInvoiceRoom(report)) &&
[
CONST.REPORT.ACTIONS.TYPE.IOU,
CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW,
Expand Down

0 comments on commit bdc3a15

Please sign in to comment.