From 3f66c546cf47c7ce1caa01e6f14bd11ff51b35a9 Mon Sep 17 00:00:00 2001 From: dominictb Date: Thu, 11 Jul 2024 20:31:28 +0700 Subject: [PATCH] fix Deleted task is shown briefly and then disappears from conversation page --- src/libs/actions/Task.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Task.ts b/src/libs/actions/Task.ts index 0a7244bde1e5..5df361a973c2 100644 --- a/src/libs/actions/Task.ts +++ b/src/libs/actions/Task.ts @@ -929,7 +929,7 @@ function deleteTask(report: OnyxEntry) { // If the task report is the last visible action in the parent report, we should navigate back to the parent report const shouldDeleteTaskReport = !ReportActionsUtils.doesReportHaveVisibleActions(report.reportID ?? '-1'); const optimisticReportAction: Partial = { - pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, + pendingAction: shouldDeleteTaskReport ? CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE : CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, previousMessage: parentReportAction?.message, message: [ {