From f4c236cb24a3dbd78487850d10c07a300e86fff5 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Thu, 27 Jul 2023 17:30:27 +0100 Subject: [PATCH] Replace policyIDList with policyIDToLastModified map in Reconnect App call --- src/libs/actions/App.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 1455f52e891a..0b3387116d72 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -51,18 +51,6 @@ function confirmReadyToOpenApp() { resolveIsReadyPromise(); } -/** - * @param {Array} policies - * @return {Array} array of policy ids - */ -function getNonOptimisticPolicyIDs(policies) { - return _.chain(policies) - .reject((policy) => lodashGet(policy, 'pendingAction', null) === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) - .pluck('id') - .compact() - .value(); -} - /** * @param {Array} policies * @return {Object} map of policy id to lastUpdated @@ -148,7 +136,7 @@ function openApp(isReconnecting = false) { // // - Look through the local report actions and reports to find the most recently modified report action or report. // - We send this to the server so that it can compute which new chats the user needs to see and return only those as an optimization. - const params = {policyIDList: getNonOptimisticPolicyIDs(policies), policyIDToLastModified: JSON.stringify(getNonOptimisticPolicyIDToLastModifiedMap(policies))}; + const params = {policyIDToLastModified: JSON.stringify(getNonOptimisticPolicyIDToLastModifiedMap(policies))}; if (isReconnecting) { Timing.start(CONST.TIMING.CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION); params.mostRecentReportActionLastModified = ReportActionsUtils.getMostRecentReportActionLastModified();