Skip to content

Commit

Permalink
fix new message shows when creating a new expense
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Nov 20, 2024
1 parent 9368566 commit 1ce059b
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 @@ -5172,6 +5172,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 @@ -281,7 +281,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 1ce059b

Please sign in to comment.