From 8e94e2d96453d4aa806152241f1bbd85c93de4ad Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Thu, 7 Sep 2023 23:37:03 +0700 Subject: [PATCH] remove optimistic parent report action when adding system message --- src/libs/actions/Task.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 6227686b3f45..cab5923a38ee 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -270,12 +270,6 @@ function completeTask(taskReport, taskTitle) { }, ]; - // Update optimistic data for parent report action - const optimisticDataForParentReportAction = ReportUtils.getOptimisticDataForParentReportAction(taskReportID, completedTaskReportAction.created, CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD); - if (!_.isEmpty(optimisticDataForParentReportAction)) { - optimisticData.push(optimisticDataForParentReportAction); - } - // Multiple report actions can link to the same child. Both share destination (task parent) and assignee report link to the same report action. // We need to find and update the other parent report action (in assignee report). More info https://github.com/Expensify/App/issues/23920#issuecomment-1663092717 const assigneeReportAction = ReportUtils.getTaskParentReportActionIDInAssigneeReport(taskReport); @@ -363,12 +357,6 @@ function reopenTask(taskReport, taskTitle) { }, ]; - // Update optimistic data for parent report action - const optimisticDataForParentReportAction = ReportUtils.getOptimisticDataForParentReportAction(taskReportID, reopenedTaskReportAction.created, CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD); - if (!_.isEmpty(optimisticDataForParentReportAction)) { - optimisticData.push(optimisticDataForParentReportAction); - } - // Multiple report actions can link to the same child. Both share destination (task parent) and assignee report link to the same report action. // We need to find and update the other parent report action (in assignee report). More info https://github.com/Expensify/App/issues/23920#issuecomment-1663092717 const assigneeReportAction = ReportUtils.getTaskParentReportActionIDInAssigneeReport(taskReport);