Skip to content

Commit

Permalink
Revert "use reportID in getReportNotificationPreference"
Browse files Browse the repository at this point in the history
This reverts commit d3daf61.
  • Loading branch information
rezkiy37 committed Oct 20, 2023
1 parent d3daf61 commit 8484427
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,13 @@ function getReport(reportID) {
}

/**
* Get the notification preference given a reportID
* Get the notification preference given a report
*
* @param {String} reportID
* @param {Object} report
* @returns {String}
*/
function getReportNotificationPreference(reportID) {
return lodashGet(getReport(reportID), 'notificationPreference', '');
function getReportNotificationPreference(report) {
return lodashGet(report, 'notificationPreference', '');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function addActions(reportID, text = '', file) {
isLastMessageDeletedParentAction: null,
};

if (ReportUtils.getReportNotificationPreference(reportID) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
if (ReportUtils.getReportNotificationPreference(ReportUtils.getReport(reportID)) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
optimisticReport.notificationPreference = CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS;
}

Expand Down

0 comments on commit 8484427

Please sign in to comment.