From e50f9c99b01a17b98da38e98405e7c58ad342169 Mon Sep 17 00:00:00 2001 From: Roji Philip Date: Thu, 18 Jan 2024 17:28:48 +0530 Subject: [PATCH] ignore domain room reports for first time user sigin --- src/libs/ReportUtils.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 58e93d521827..ad704d06b145 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -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. @@ -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; }