Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Transaction report shows multiline title for expense with multiline description #42631

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3194,7 +3194,7 @@ function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = nu
if (isArchivedRoom(report)) {
formattedName += ` (${Localize.translateLocal('common.archived')})`;
}
return formattedName;
return formatReportLastMessageText(formattedName);
}

if (parentReportAction?.message?.[0]?.isDeletedParentAction) {
Expand Down Expand Up @@ -3266,7 +3266,7 @@ function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = nu
}

if (formattedName) {
return formattedName;
return formatReportLastMessageText(formattedName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if it is necessary or not, could you explain why we need to update this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DylanDylann The update here is to prevent similar bugs in the future if the formattedName variable ever contains a line break.

}

// Not a room or PolicyExpenseChat, generate title from first 5 other participants
Expand Down
Loading