From 95b50cdb7a1252df16429173df9ddbc085bbeb86 Mon Sep 17 00:00:00 2001 From: dominictb Date: Sat, 13 Jul 2024 16:37:06 +0700 Subject: [PATCH 1/3] fix: allow user to say in room report screen in case user leaves workspace room or chat thread Signed-off-by: dominictb --- src/libs/actions/Report.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 026ce45146d3..edd0ac813010 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2704,6 +2704,12 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal }; API.write(WRITE_COMMANDS.LEAVE_ROOM, parameters, {optimisticData, successData, failureData}); + + // if this is the leave action from workspace room or chat thread, simply dismiss the modal, i.e: allowing user to view the room/thread and join again immediately + if (isWorkspaceMemberLeavingWorkspaceRoom || isChatThread) { + return; + } + // in other case, the report is deleted and we should move the user to other report navigateToMostRecentReport(report); } From dc7b924119000bdab034cb3e96cb1fba7d8e44b5 Mon Sep 17 00:00:00 2001 From: Dominic <165644294+dominictb@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:04:44 +0700 Subject: [PATCH 2/3] fix: update comments Co-authored-by: Sahil --- 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 edd0ac813010..bc17b6ae2abe 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2705,7 +2705,7 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal API.write(WRITE_COMMANDS.LEAVE_ROOM, parameters, {optimisticData, successData, failureData}); - // if this is the leave action from workspace room or chat thread, simply dismiss the modal, i.e: allowing user to view the room/thread and join again immediately + // If this is the leave action from a workspace room or chat thread, simply dismiss the modal, i.e., allow the user to view the room/thread and join again immediately. if (isWorkspaceMemberLeavingWorkspaceRoom || isChatThread) { return; } From 6e10dc95d9f16801575dcfd1866eccf5bacd8540 Mon Sep 17 00:00:00 2001 From: Dominic <165644294+dominictb@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:04:56 +0700 Subject: [PATCH 3/3] fix: update comments Co-authored-by: Sahil --- 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 bc17b6ae2abe..af7d1304603a 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2709,7 +2709,7 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal if (isWorkspaceMemberLeavingWorkspaceRoom || isChatThread) { return; } - // in other case, the report is deleted and we should move the user to other report + // In other cases, the report is deleted and we should move the user to another report. navigateToMostRecentReport(report); }