From 9a2c7a8d1dd9203fde03f80671a9f1ed39446c03 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sun, 19 Nov 2023 09:55:15 +0530 Subject: [PATCH 1/5] fix: Receipt - The border green line on top and bottom in native. Signed-off-by: Krishna Gupta --- .../NavigationAwareCamera/index.native.js | 16 ++++++++++------ src/pages/iou/ReceiptSelector/index.native.js | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js b/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js index 65c17d3cb7ab..84f98cd0c42c 100644 --- a/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js +++ b/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import {Camera} from 'react-native-vision-camera'; import useTabNavigatorFocus from '@hooks/useTabNavigatorFocus'; +import useThemeStyles from '@styles/useThemeStyles'; const propTypes = { /* The index of the tab that contains this camera */ @@ -11,14 +12,17 @@ const propTypes = { // Wraps a camera that will only be active when the tab is focused or as soon as it starts to become focused. const NavigationAwareCamera = React.forwardRef(({cameraTabIndex, ...props}, ref) => { const isCameraActive = useTabNavigatorFocus({tabIndex: cameraTabIndex}); + const styles = useThemeStyles(); return ( - + + + ); }); diff --git a/src/pages/iou/ReceiptSelector/index.native.js b/src/pages/iou/ReceiptSelector/index.native.js index 8a1db47aa742..e1617a5fce88 100644 --- a/src/pages/iou/ReceiptSelector/index.native.js +++ b/src/pages/iou/ReceiptSelector/index.native.js @@ -205,14 +205,16 @@ function ReceiptSelector({route, report, iou, transactionID}) { )} {cameraPermissionStatus === RESULTS.GRANTED && device != null && ( - + + + )} From c3a54a75e404402e57d88cdcbcacb05489cb3b40 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sun, 19 Nov 2023 10:13:41 +0530 Subject: [PATCH 2/5] minor fix. Signed-off-by: Krishna Gupta --- .../iou/ReceiptSelector/NavigationAwareCamera/index.native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js b/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js index 84f98cd0c42c..0714d4e89b6b 100644 --- a/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js +++ b/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; +import {View} from 'react-native'; import {Camera} from 'react-native-vision-camera'; import useTabNavigatorFocus from '@hooks/useTabNavigatorFocus'; import useThemeStyles from '@styles/useThemeStyles'; From 98bcf46e7853210373977b218e24687fcc3b2870 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sun, 19 Nov 2023 10:55:42 +0530 Subject: [PATCH 3/5] minor fix. Signed-off-by: Krishna Gupta --- .../NavigationAwareCamera/index.native.js | 17 ++++++---------- src/pages/iou/ReceiptSelector/index.native.js | 20 ++++++++++--------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js b/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js index 0714d4e89b6b..65c17d3cb7ab 100644 --- a/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js +++ b/src/pages/iou/ReceiptSelector/NavigationAwareCamera/index.native.js @@ -1,9 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; -import {View} from 'react-native'; import {Camera} from 'react-native-vision-camera'; import useTabNavigatorFocus from '@hooks/useTabNavigatorFocus'; -import useThemeStyles from '@styles/useThemeStyles'; const propTypes = { /* The index of the tab that contains this camera */ @@ -13,17 +11,14 @@ const propTypes = { // Wraps a camera that will only be active when the tab is focused or as soon as it starts to become focused. const NavigationAwareCamera = React.forwardRef(({cameraTabIndex, ...props}, ref) => { const isCameraActive = useTabNavigatorFocus({tabIndex: cameraTabIndex}); - const styles = useThemeStyles(); return ( - - - + ); }); diff --git a/src/pages/iou/ReceiptSelector/index.native.js b/src/pages/iou/ReceiptSelector/index.native.js index e1617a5fce88..e516502110fb 100644 --- a/src/pages/iou/ReceiptSelector/index.native.js +++ b/src/pages/iou/ReceiptSelector/index.native.js @@ -62,7 +62,7 @@ function ReceiptSelector({route, report, iou, transactionID}) { const theme = useTheme(); const styles = useThemeStyles(); const devices = useCameraDevices('wide-angle-camera'); - const device = devices.back; + const device = devices.front; const camera = useRef(null); const [flash, setFlash] = useState(false); @@ -206,14 +206,16 @@ function ReceiptSelector({route, report, iou, transactionID}) { )} {cameraPermissionStatus === RESULTS.GRANTED && device != null && ( - + + + )} From abba5b5c52ee04a06cae2c847735abb0d8ba2f1b Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sun, 19 Nov 2023 10:56:31 +0530 Subject: [PATCH 4/5] minor fix. Signed-off-by: Krishna Gupta --- src/pages/iou/ReceiptSelector/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/ReceiptSelector/index.native.js b/src/pages/iou/ReceiptSelector/index.native.js index e516502110fb..e90536c4271b 100644 --- a/src/pages/iou/ReceiptSelector/index.native.js +++ b/src/pages/iou/ReceiptSelector/index.native.js @@ -62,7 +62,7 @@ function ReceiptSelector({route, report, iou, transactionID}) { const theme = useTheme(); const styles = useThemeStyles(); const devices = useCameraDevices('wide-angle-camera'); - const device = devices.front; + const device = devices.back; const camera = useRef(null); const [flash, setFlash] = useState(false); From 857a9d3ccc4d39a60af06ed2f789c123486ca40f Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sun, 19 Nov 2023 15:08:22 +0530 Subject: [PATCH 5/5] fix: typo. Signed-off-by: Krishna Gupta --- src/pages/iou/ReceiptSelector/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/ReceiptSelector/index.native.js b/src/pages/iou/ReceiptSelector/index.native.js index e90536c4271b..1addabdd929d 100644 --- a/src/pages/iou/ReceiptSelector/index.native.js +++ b/src/pages/iou/ReceiptSelector/index.native.js @@ -212,7 +212,7 @@ function ReceiptSelector({route, report, iou, transactionID}) { device={device} style={[styles.flex1]} zoom={device.neutralZoom} - photoc + photo cameraTabIndex={pageIndex} />