From 60d69fb177bdced8c0e05d6dea82bbdc5943a4a0 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 29 Dec 2023 11:17:42 +0700 Subject: [PATCH 1/3] fix: go back home before navigating to Concierge --- src/libs/actions/Report.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 4ac46fcf212e..9d3c115dcdea 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2110,6 +2110,7 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]); const chat = ReportUtils.getChatByParticipants(participantAccountIDs); if (chat?.reportID) { + Navigation.goBack(ROUTES.HOME); Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID)); } } From 29031d292fab574c8e166d39cacb5476bcc1ff23 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Thu, 4 Jan 2024 15:40:37 +0700 Subject: [PATCH 2/3] fix: add comment --- src/libs/actions/Report.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 9d3c115dcdea..8c948ff26df4 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2110,6 +2110,7 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]); const chat = ReportUtils.getChatByParticipants(participantAccountIDs); if (chat?.reportID) { + // We should call Navigation.goBack to pop the current route first before navigating to Concierge. Navigation.goBack(ROUTES.HOME); Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID)); } From cf7b1dc80342965b55c086803a585c2ee54d167c Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Thu, 4 Jan 2024 15:50:09 +0700 Subject: [PATCH 3/3] fix lint --- src/libs/actions/Report.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 8c948ff26df4..2fab25a73b77 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2110,7 +2110,7 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]); const chat = ReportUtils.getChatByParticipants(participantAccountIDs); if (chat?.reportID) { - // We should call Navigation.goBack to pop the current route first before navigating to Concierge. + // We should call Navigation.goBack to pop the current route first before navigating to Concierge. Navigation.goBack(ROUTES.HOME); Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID)); }