From f89449c3f63c392625e9d33774d6d0db93dec0ff Mon Sep 17 00:00:00 2001 From: Steven KKC Date: Mon, 17 Jul 2023 14:20:05 -0400 Subject: [PATCH 1/2] fix navigating to thread --- src/pages/workspace/WorkspaceInitialPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 38be2fa07655..4b1ff7744282 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -104,7 +104,7 @@ function WorkspaceInitialPage(props) { */ const goToRoom = useCallback( (type) => { - const room = _.find(props.reports, (report) => report && report.policyID === policy.id && report.chatType === type); + const room = _.find(props.reports, (report) => report && report.policyID === policy.id && report.chatType === type && !report.parentReportID && !report.parentReportActionID); Navigation.navigate(ROUTES.getReportRoute(room.reportID)); }, [props.reports, policy], From b896aca928f723e81f8c0e9d92751b98cdadfc42 Mon Sep 17 00:00:00 2001 From: Steven KKC Date: Mon, 17 Jul 2023 14:35:04 -0400 Subject: [PATCH 2/2] use ReportUtils.isThread --- src/pages/workspace/WorkspaceInitialPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 4b1ff7744282..b1f797eb239c 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -104,7 +104,7 @@ function WorkspaceInitialPage(props) { */ const goToRoom = useCallback( (type) => { - const room = _.find(props.reports, (report) => report && report.policyID === policy.id && report.chatType === type && !report.parentReportID && !report.parentReportActionID); + const room = _.find(props.reports, (report) => report && report.policyID === policy.id && report.chatType === type && !ReportUtils.isThread(report)); Navigation.navigate(ROUTES.getReportRoute(room.reportID)); }, [props.reports, policy],