From 830446893d5a843737a0bbeed46c86ad5f302002 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 11 Jul 2023 12:10:31 +0800 Subject: [PATCH 1/2] disable share somewhere if initiated from a report --- src/pages/tasks/NewTaskPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/tasks/NewTaskPage.js b/src/pages/tasks/NewTaskPage.js index a2ac357aa17a..9ce6818bc3d1 100644 --- a/src/pages/tasks/NewTaskPage.js +++ b/src/pages/tasks/NewTaskPage.js @@ -169,7 +169,8 @@ function NewTaskPage(props) { description={shareDestination.displayName ? shareDestination.subtitle : props.translate('newTaskPage.shareSomewhere')} icon={shareDestination.icons} onPress={() => Navigation.navigate(ROUTES.NEW_TASK_SHARE_DESTINATION)} - shouldShowRightIcon + interactive={!Boolean(props.task.parentReportID)} + shouldShowRightIcon={!Boolean(props.task.parentReportID)} /> Date: Tue, 11 Jul 2023 12:30:21 +0800 Subject: [PATCH 2/2] remove redundant boolean cast --- src/pages/tasks/NewTaskPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/tasks/NewTaskPage.js b/src/pages/tasks/NewTaskPage.js index 9ce6818bc3d1..df00ab7b7dfa 100644 --- a/src/pages/tasks/NewTaskPage.js +++ b/src/pages/tasks/NewTaskPage.js @@ -169,8 +169,8 @@ function NewTaskPage(props) { description={shareDestination.displayName ? shareDestination.subtitle : props.translate('newTaskPage.shareSomewhere')} icon={shareDestination.icons} onPress={() => Navigation.navigate(ROUTES.NEW_TASK_SHARE_DESTINATION)} - interactive={!Boolean(props.task.parentReportID)} - shouldShowRightIcon={!Boolean(props.task.parentReportID)} + interactive={!props.task.parentReportID} + shouldShowRightIcon={!props.task.parentReportID} />