Skip to content

Commit

Permalink
Dont use report for isArchived
Browse files Browse the repository at this point in the history
  • Loading branch information
srikarparsi committed Nov 20, 2024
1 parent 9368566 commit 379acb1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
12 changes: 12 additions & 0 deletions ios/tmp.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/
SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/
EXPENSIFY_URL=https:/$()/www.expensify.com/
EXPENSIFY_PARTNER_NAME=chat-expensify-com
EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66
PUSHER_APP_KEY=268df511a204fbb60884
USE_WEB_PROXY=false
ENVIRONMENT=production
SEND_CRASH_REPORTS=true
FB_API_KEY=AIzaSyDxzigVLZl4G8MP7jACQ0qpmADMzmrrON0
FB_APP_ID=1:921154746561:web:1583e882584cf151027c40
FB_PROJECT_ID=expensify-chat
8 changes: 3 additions & 5 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1461,17 +1461,15 @@ function isClosedExpenseReportWithNoExpenses(report: OnyxEntry<Report>): boolean
* Whether the provided report is an archived room
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function isArchivedRoom(report: OnyxInputOrEntry<Report>, reportNameValuePairs?: OnyxInputOrEntry<ReportNameValuePairs>): boolean {
return !!report?.private_isArchived;
function isArchivedRoom(reportNameValuePairs?: OnyxInputOrEntry<ReportNameValuePairs>): boolean {
return !!reportNameValuePairs?.private_isArchived;
}

/**
* Whether the report with the provided reportID is an archived room
*/
function isArchivedRoomWithID(reportID?: string) {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const report = ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID || -1}`];
return isArchivedRoom(report, getReportNameValuePairs(reportID));
return isArchivedRoom(getReportNameValuePairs(reportID));
}

/**
Expand Down

0 comments on commit 379acb1

Please sign in to comment.