From 9945d3c10ae2a6b51e1758ec56fdf6860bc90f30 Mon Sep 17 00:00:00 2001 From: Roji Philip Date: Fri, 6 Oct 2023 12:15:18 +0530 Subject: [PATCH] last message fetch using optimistic actions --- src/libs/actions/Task.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 8e9a76f4096a..e7b29bb7ea6c 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -774,8 +774,8 @@ function cancelTask(taskReportID, taskTitle, originalStateNum, originalStatusNum onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport.reportID}`, value: { - lastMessageText: ReportActionsUtils.getLastVisibleMessage(parentReport.reportID, {[parentReportAction.reportActionID]: null}).lastMessageText, - lastVisibleActionCreated: ReportActionsUtils.getLastVisibleAction(parentReport.reportID, {[parentReportAction.reportActionID]: null}).created, + lastMessageText: ReportActionsUtils.getLastVisibleMessage(parentReport.reportID, optimisticReportActions).lastMessageText, + lastVisibleActionCreated: ReportActionsUtils.getLastVisibleAction(parentReport.reportID, optimisticReportActions).created, }, }, {