Skip to content

Commit

Permalink
Merge pull request #52811 from bernhardoj/fix/52579-new-message-shows…
Browse files Browse the repository at this point in the history
…-when-creating-new-expense
  • Loading branch information
dangrous authored Nov 22, 2024
2 parents 4179eef + 1ce059b commit fd94469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,7 @@ function buildOptimisticReportPreview(
actorAccountID: hasReceipt ? currentUserAccountID : reportActorAccountID,
childReportID: childReportID ?? iouReport?.reportID,
childMoneyRequestCount: 1,
childLastActorAccountID: currentUserAccountID,
childLastMoneyRequestComment: comment,
childRecentReceiptTransactionIDs: hasReceipt && !isEmptyObject(transaction) ? {[transaction?.transactionID ?? '-1']: created} : undefined,
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function ReportActionsList({
}

// If no unread marker exists, don't set an unread marker for newly added messages from the current user.
const isFromCurrentUser = accountID === (ReportActionsUtils.isReportPreviewAction(message) ? !message.childLastActorAccountID : message.actorAccountID);
const isFromCurrentUser = accountID === (ReportActionsUtils.isReportPreviewAction(message) ? message.childLastActorAccountID : message.actorAccountID);
const isNewMessage = !prevSortedVisibleReportActionsObjects[message.reportActionID];

// The unread marker will show if the action's `created` time is later than `unreadMarkerTime`.
Expand Down

0 comments on commit fd94469

Please sign in to comment.