Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Remove unused functions from src/libs/actions/ReportActions #10369

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions src/libs/actions/ReportActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -141,8 +110,6 @@ function deleteClientAction(reportID, clientID) {
}

export {
isReportMissingActions,
dangerouslyGetReportActionsMaxSequenceNumber,
getDeletedCommentsCount,
getLastVisibleMessageText,
isFromCurrentUser,
Expand Down