From 6ec282dee0c0d549073c0621ce25bd4315815ba1 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Thu, 21 Sep 2023 08:50:06 +0200 Subject: [PATCH 1/4] Fix App displays waypoint address page briefly on click on Go back to Home page --- src/pages/iou/WaypointEditor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/WaypointEditor.js b/src/pages/iou/WaypointEditor.js index e34730acccea..b3980935c7b4 100644 --- a/src/pages/iou/WaypointEditor.js +++ b/src/pages/iou/WaypointEditor.js @@ -4,7 +4,7 @@ import lodashGet from 'lodash/get'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import {useIsFocused} from '@react-navigation/native'; +import {useNavigation} from '@react-navigation/native'; import AddressSearch from '../../components/AddressSearch'; import ScreenWrapper from '../../components/ScreenWrapper'; import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; @@ -76,7 +76,7 @@ const defaultProps = { function WaypointEditor({transactionID, route: {params: {iouType = '', waypointIndex = ''} = {}} = {}, transaction, recentWaypoints}) { const {windowWidth} = useWindowDimensions(); const [isDeleteStopModalOpen, setIsDeleteStopModalOpen] = useState(false); - const isFocused = useIsFocused(); + const isFocused = useNavigation().isFocused(); const {translate} = useLocalize(); const {isOffline} = useNetwork(); const textInput = useRef(null); From 2c788c662cbd9dc682af7d703d708c0a5ed23479 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Thu, 21 Sep 2023 09:35:48 +0200 Subject: [PATCH 2/4] Refactor useNavigation hook --- ios/tmp.xcconfig | 10 +++++++++- src/pages/iou/WaypointEditor.js | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig index 8b137891791f..2f2502669450 100644 --- a/ios/tmp.xcconfig +++ b/ios/tmp.xcconfig @@ -1 +1,9 @@ - +NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/ +SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/ +EXPENSIFY_URL=https:/$()/www.expensify.com/ +EXPENSIFY_PARTNER_NAME=chat-expensify-com +EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66 +PUSHER_APP_KEY=268df511a204fbb60884 +USE_WEB_PROXY=false +ENVIRONMENT=production +SEND_CRASH_REPORTS=true diff --git a/src/pages/iou/WaypointEditor.js b/src/pages/iou/WaypointEditor.js index b3980935c7b4..c214290b46fd 100644 --- a/src/pages/iou/WaypointEditor.js +++ b/src/pages/iou/WaypointEditor.js @@ -76,7 +76,8 @@ const defaultProps = { function WaypointEditor({transactionID, route: {params: {iouType = '', waypointIndex = ''} = {}} = {}, transaction, recentWaypoints}) { const {windowWidth} = useWindowDimensions(); const [isDeleteStopModalOpen, setIsDeleteStopModalOpen] = useState(false); - const isFocused = useNavigation().isFocused(); + const navigation = useNavigation(); + const isFocused = navigation.isFocused(); const {translate} = useLocalize(); const {isOffline} = useNetwork(); const textInput = useRef(null); From 5b1939860def2080c21d9a2f07f10810b94451aa Mon Sep 17 00:00:00 2001 From: Yauheni Date: Thu, 21 Sep 2023 09:45:54 +0200 Subject: [PATCH 3/4] Clear tmp.xcconfig --- ios/tmp.xcconfig | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig index 2f2502669450..e69de29bb2d1 100644 --- a/ios/tmp.xcconfig +++ b/ios/tmp.xcconfig @@ -1,9 +0,0 @@ -NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/ -SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/ -EXPENSIFY_URL=https:/$()/www.expensify.com/ -EXPENSIFY_PARTNER_NAME=chat-expensify-com -EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66 -PUSHER_APP_KEY=268df511a204fbb60884 -USE_WEB_PROXY=false -ENVIRONMENT=production -SEND_CRASH_REPORTS=true From 944d6ae36e0bc39da6679c4187807cec979f6bf8 Mon Sep 17 00:00:00 2001 From: Yauheni Date: Thu, 21 Sep 2023 09:48:37 +0200 Subject: [PATCH 4/4] Clear tmp.xcconfig x2 --- ios/tmp.xcconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig index e69de29bb2d1..8b137891791f 100644 --- a/ios/tmp.xcconfig +++ b/ios/tmp.xcconfig @@ -0,0 +1 @@ +