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();