From 983b37ce662879265b747b2fd903d20a480359ea Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Thu, 11 Aug 2022 15:48:47 -0700 Subject: [PATCH] Remove unused functions from src/libs/actions/ReportActions --- src/libs/actions/ReportActions.js | 33 ------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/libs/actions/ReportActions.js b/src/libs/actions/ReportActions.js index caed131681db..ca108c86a829 100644 --- a/src/libs/actions/ReportActions.js +++ b/src/libs/actions/ReportActions.js @@ -45,37 +45,6 @@ Onyx.connect({ }, }); -/** - * WARNING: Do not use this method to access the maxSequenceNumber for a report. This ONLY returns the maxSequenceNumber - * for reportActions that are stored in Onyx under a reportActions_* key. - * - * @param {Number} reportID - * @param {Boolean} shouldWarn - * @returns {Number} - */ -function dangerouslyGetReportActionsMaxSequenceNumber(reportID, shouldWarn = true) { - if (shouldWarn) { - console.error('WARNING: dangerouslyGetReportActionsMaxSequenceNumber is unreliable as it ONLY references ' - + 'reportActions in storage. It should not be used to access the maxSequenceNumber for a report. Use ' - + 'reportMaxSequenceNumbers[reportID] instead.'); - } - - return reportActionsMaxSequenceNumbers[reportID]; -} - -/** - * Compares the maximum sequenceNumber that we know about with the most recent report action we have saved. - * If we have no report actions at all for the report we will assume that it is missing actions. - * - * @param {Number} reportID - * @param {Number} maxKnownSequenceNumber - * @returns {Boolean} - */ -function isReportMissingActions(reportID, maxKnownSequenceNumber) { - return _.isUndefined(reportActionsMaxSequenceNumbers[reportID]) - || reportActionsMaxSequenceNumbers[reportID] < maxKnownSequenceNumber; -} - /** * Get the count of deleted messages after a sequence number of a report * @param {Number|String} reportID @@ -141,8 +110,6 @@ function deleteClientAction(reportID, clientID) { } export { - isReportMissingActions, - dangerouslyGetReportActionsMaxSequenceNumber, getDeletedCommentsCount, getLastVisibleMessageText, isFromCurrentUser,