@@ -4141,7 +4141,7 @@ function doneCheckingPublicRoom() {
41414141 Onyx . set ( ONYXKEYS . IS_CHECKING_PUBLIC_ROOM , false ) ;
41424142}
41434143
4144- function navigateToMostRecentReport ( currentReport : OnyxEntry < Report > , conciergeReportID : string | undefined , currentUserAccountID : number ) {
4144+ function navigateToMostRecentReport ( currentReport : OnyxEntry < Report > , conciergeReportID : string | undefined , currentUserAccountID : number , introSelected : OnyxEntry < IntroSelected > ) {
41454145 const lastAccessedReportID = findLastAccessedReport ( false , false , currentReport ?. reportID ) ?. reportID ;
41464146
41474147 if ( lastAccessedReportID ) {
@@ -4162,7 +4162,7 @@ function navigateToMostRecentReport(currentReport: OnyxEntry<Report>, conciergeR
41624162 Navigation . goBack ( ) ;
41634163 }
41644164
4165- navigateToConciergeChat ( conciergeReportID , deprecatedIntroSelected , currentUserAccountID , false , ( ) => true , { forceReplace : true } ) ;
4165+ navigateToConciergeChat ( conciergeReportID , introSelected , currentUserAccountID , false , ( ) => true , { forceReplace : true } ) ;
41664166 }
41674167}
41684168
@@ -4185,7 +4185,7 @@ function joinRoom(report: OnyxEntry<Report>, currentUserAccountID: number) {
41854185 ) ;
41864186}
41874187
4188- function leaveGroupChat ( report : Report , shouldClearQuickAction : boolean , currentUserAccountID : number , conciergeReportID : string | undefined ) {
4188+ function leaveGroupChat ( report : Report , shouldClearQuickAction : boolean , currentUserAccountID : number , conciergeReportID : string | undefined , introSelected : OnyxEntry < IntroSelected > ) {
41894189 const reportID = report . reportID ;
41904190 // Use merge instead of set to avoid deleting the report too quickly, which could cause a brief "not found" page to appear.
41914191 // The remaining parts of the report object will be removed after the API call is successful.
@@ -4232,12 +4232,18 @@ function leaveGroupChat(report: Report, shouldClearQuickAction: boolean, current
42324232 } ,
42334233 ] ;
42344234
4235- navigateToMostRecentReport ( report , conciergeReportID , currentUserAccountID ) ;
4235+ navigateToMostRecentReport ( report , conciergeReportID , currentUserAccountID , introSelected ) ;
42364236 API . write ( WRITE_COMMANDS . LEAVE_GROUP_CHAT , { reportID} , { optimisticData, successData, failureData} ) ;
42374237}
42384238
42394239/** Leave a report by setting the state to submitted and closed */
4240- function leaveRoom ( report : Report , currentUserAccountID : number , conciergeReportID : string | undefined , isWorkspaceMemberLeavingWorkspaceRoom = false ) {
4240+ function leaveRoom (
4241+ report : Report ,
4242+ currentUserAccountID : number ,
4243+ conciergeReportID : string | undefined ,
4244+ introSelected : OnyxEntry < IntroSelected > ,
4245+ isWorkspaceMemberLeavingWorkspaceRoom = false ,
4246+ ) {
42414247 const reportID = report . reportID ;
42424248 const isChatThread = isChatThreadReportUtils ( report ) ;
42434249
@@ -4341,7 +4347,7 @@ function leaveRoom(report: Report, currentUserAccountID: number, conciergeReport
43414347 return ;
43424348 }
43434349 // In other cases, the report is deleted and we should move the user to another report.
4344- navigateToMostRecentReport ( report , conciergeReportID , currentUserAccountID ) ;
4350+ navigateToMostRecentReport ( report , conciergeReportID , currentUserAccountID , introSelected ) ;
43454351}
43464352
43474353function buildInviteToRoomOnyxData ( report : Report , inviteeEmailsToAccountIDs : InvitedEmailsToAccountIDs , formatPhoneNumber : LocaleContextProps [ 'formatPhoneNumber' ] ) {
0 commit comments