Skip to content

Commit

Permalink
Merge pull request #24055 from Pujan92/fix/21200
Browse files Browse the repository at this point in the history
Fix: Web/Desktop - On back button press navigates to Confirm task screen instead of hide modal
  • Loading branch information
pecanoro authored Aug 7, 2023
2 parents f49ce3c + c48049d commit 2b49a5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/TaskView.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const propTypes = {

function TaskView(props) {
useEffect(() => {
Task.setTaskReport({...props.report, isExistingTaskReport: true});
Task.setTaskReport({...props.report});
}, [props.report]);

const taskTitle = convertToLTR(props.report.reportName || '');
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tasks/TaskAssigneeSelectorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function TaskAssigneeSelectorModal(props) {
<>
<HeaderWithBackButton
title={props.translate('task.assignee')}
onBackButtonPress={() => (lodashGet(props.task.report, 'isExistingTaskReport') ? Navigation.dismissModal() : Navigation.goBack(ROUTES.NEW_TASK))}
onBackButtonPress={() => (lodashGet(props.route.params, 'reportID') ? Navigation.dismissModal() : Navigation.goBack(ROUTES.NEW_TASK))}
/>
<View style={[styles.flex1, styles.w100, styles.pRelative]}>
<OptionsSelector
Expand Down

0 comments on commit 2b49a5f

Please sign in to comment.