Skip to content

Commit 088f5b3

Browse files
authored
Merge pull request Expensify#75724 from linhvovan29546/fix/65617-workspace-chat-unread
fix: workspace chat in the LHN shows as unread after creating an empty report
2 parents 2817ffe + af23eba commit 088f5b3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/libs/actions/Report.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,7 +2873,7 @@ function buildNewReportOptimisticData(
28732873
{
28742874
onyxMethod: Onyx.METHOD.MERGE,
28752875
key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport?.reportID}`,
2876-
value: {lastVisibleActionCreated: optimisticReportPreview.created, iouReportID: reportID, ...outstandingChildRequest},
2876+
value: {iouReportID: reportID, ...outstandingChildRequest},
28772877
},
28782878
{
28792879
onyxMethod: Onyx.METHOD.MERGE,
@@ -2919,7 +2919,7 @@ function buildNewReportOptimisticData(
29192919
{
29202920
onyxMethod: Onyx.METHOD.MERGE,
29212921
key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport?.reportID}`,
2922-
value: {lastVisibleActionCreated: parentReport?.lastVisibleActionCreated, hasOutstandingChildRequest: parentReport?.hasOutstandingChildRequest},
2922+
value: {hasOutstandingChildRequest: parentReport?.hasOutstandingChildRequest},
29232923
},
29242924
];
29252925

tests/actions/ReportTest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,6 @@ describe('actions/Report', () => {
17791779
const parentPolicyExpenseChat = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${parentReport?.reportID}`];
17801780
// assert correctness of crucial onyx data
17811781
expect(createdReport?.reportID).toBe(reportID);
1782-
expect(parentPolicyExpenseChat?.lastVisibleActionCreated).toBe(reportPreviewAction?.created);
17831782
expect(parentPolicyExpenseChat?.hasOutstandingChildRequest).toBe(true);
17841783
expect(createdReport?.total).toBe(0);
17851784
expect(createdReport?.parentReportActionID).toBe(reportPreviewAction?.reportActionID);

0 commit comments

Comments
 (0)