Skip to content

Commit be4cd10

Browse files
committed
update isReportArchived param
1 parent a1d1542 commit be4cd10

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/libs/SidebarUtils.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function shouldDisplayReportInLHN(
205205
isInFocusMode: boolean,
206206
betas: OnyxEntry<Beta[]>,
207207
transactionViolations: OnyxCollection<TransactionViolation[]>,
208-
reportNameValuePairs?: OnyxEntry<ReportNameValuePairs>,
208+
isReportArchived?: boolean,
209209
reportAttributes?: ReportAttributesDerivedValue['reports'],
210210
) {
211211
if (!report) {
@@ -236,7 +236,6 @@ function shouldDisplayReportInLHN(
236236

237237
// Check if report should override hidden status
238238
const isSystemChat = isSystemChatUtil(report);
239-
const isReportArchived = isArchivedReport(reportNameValuePairs);
240239
const shouldOverrideHidden =
241240
hasValidDraftComment(report.reportID) || hasErrorsOtherThanFailedReceipt || isFocused || isSystemChat || !!report.isPinned || reportAttributes?.[report?.reportID]?.requiresAttention;
242241

@@ -286,7 +285,7 @@ function getReportsToDisplayInLHN(
286285
isInFocusMode,
287286
betas,
288287
transactionViolations,
289-
reportNameValuePairs?.[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`],
288+
!!reportNameValuePairs?.[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`]?.private_isArchived,
290289
reportAttributes,
291290
);
292291

@@ -324,7 +323,7 @@ function updateReportsToDisplayInLHN(
324323
isInFocusMode,
325324
betas,
326325
transactionViolations,
327-
reportNameValuePairs?.[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`],
326+
!!reportNameValuePairs?.[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID}`]?.private_isArchived,
328327
reportAttributes,
329328
);
330329

0 commit comments

Comments
 (0)