Skip to content

Commit

Permalink
Merge pull request #34732 from rojiphil/33437-new-user-signin-with-pr…
Browse files Browse the repository at this point in the history
…ivate-domain

ignore domain room reports for first time user sign in
  • Loading branch information
cristipaval authored Jan 22, 2024
2 parents f37782e + e50f9c9 commit 1d21e28
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,14 +1015,6 @@ function findLastAccessedReport(
});
}

if (isFirstTimeNewExpensifyUser) {
if (sortedReports.length === 1) {
return sortedReports[0];
}

return adminReport ?? sortedReports.find((report) => !isConciergeChatReport(report)) ?? null;
}

if (ignoreDomainRooms) {
// We allow public announce rooms, admins, and announce rooms through since we bypass the default rooms beta for them.
// Check where ReportUtils.findLastAccessedReport is called in MainDrawerNavigator.js for more context.
Expand All @@ -1032,6 +1024,14 @@ function findLastAccessedReport(
);
}

if (isFirstTimeNewExpensifyUser) {
if (sortedReports.length === 1) {
return sortedReports[0];
}

return adminReport ?? sortedReports.find((report) => !isConciergeChatReport(report)) ?? null;
}

return adminReport ?? sortedReports.at(-1) ?? null;
}

Expand Down

0 comments on commit 1d21e28

Please sign in to comment.