diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 7850098cfdb2..3380aa455ecb 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -209,6 +209,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD }, [report?.reportID, isOffline, isPrivateNotesFetchTriggered, isSelfDM]); const leaveChat = useCallback(() => { + Navigation.dismissModal(); if (isChatRoom) { const isWorkspaceMemberLeavingWorkspaceRoom = (report.visibility === CONST.REPORT.VISIBILITY.RESTRICTED || isPolicyExpenseChat) && isPolicyEmployee; Report.leaveRoom(report.reportID, isWorkspaceMemberLeavingWorkspaceRoom); @@ -617,7 +618,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD isVisible={isLastMemberLeavingGroupModalVisible} onConfirm={() => { setIsLastMemberLeavingGroupModalVisible(false); - Report.leaveGroupChat(report.reportID); + leaveChat(); }} onCancel={() => setIsLastMemberLeavingGroupModalVisible(false)} prompt={translate('groupChat.lastMemberWarning')}