Skip to content

Commit

Permalink
ignore domain room reports for first time user sigin
Browse files Browse the repository at this point in the history
  • Loading branch information
rojiphil committed Jan 18, 2024
1 parent 4da7fda commit e50f9c9
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 @@ -912,14 +912,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 @@ -929,6 +921,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 e50f9c9

Please sign in to comment.