Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD on #37891] Migrate E/App to use PlatformStackNavigation #49937

Open
wants to merge 190 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
7628767
feat: revert native stack to the state when PR was merged
kirillzyusko Feb 29, 2024
349e3b0
fix: cross platform slide_from_left transition
kirillzyusko Mar 6, 2024
afcb123
fix (#37257): use instead of transition
kirillzyusko Mar 7, 2024
90c03a7
fix: ts & eslint
kirillzyusko Mar 8, 2024
047ea38
fix: show profile picture from settings
kirillzyusko Mar 8, 2024
b5e5e7d
fix: consistent transitions on Android for Settings/Profile screen
kirillzyusko Mar 8, 2024
9664f2b
fix: Status screen, pronounce screen, start chat screen -> fixed keyb…
kirillzyusko Mar 8, 2024
8860266
fix: hide keyboard on swipe for Private notes
kirillzyusko Mar 8, 2024
afde8de
feat: added integration with InteractionManager
kirillzyusko Mar 11, 2024
07fb94f
fix: prettier
kirillzyusko Mar 11, 2024
6b6690c
chore: rename patches to be more consistent wwith other changes
kirillzyusko Mar 11, 2024
b9d2262
fix: new chat -> description (keyboard close on back swipe)
kirillzyusko Mar 11, 2024
2aec5af
chore: added PRs references for patches
kirillzyusko Mar 12, 2024
3bc8265
fix: double back press from preferences causes buttons on settings sc…
kirillzyusko Mar 12, 2024
f2c32e6
chore: removed commented out code
kirillzyusko Mar 13, 2024
2fff6cb
fix: leftModalStackNavigator platform specific options
kirillzyusko Mar 15, 2024
ffa510b
fix: incorrect automatic types conversion
kirillzyusko Mar 15, 2024
651bbef
chore: update RNS to latest version, remove patch
kirillzyusko Mar 27, 2024
915bafc
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 15, 2024
6729764
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 16, 2024
ea5172c
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 17, 2024
5ca7316
update deps
chrispader Apr 17, 2024
a0be472
implement typed createPlatformStackNavigator
chrispader Apr 17, 2024
5282af1
simplify abstraction layer
chrispader Apr 17, 2024
3121e45
re-structure platform depdendent stack navigation options
chrispader Apr 17, 2024
3b9b5b0
move files
chrispader Apr 17, 2024
57bfdd2
simplify and improve createPlatformStackNavigator
chrispader Apr 17, 2024
a9dbb9e
fix: default animation
chrispader Apr 17, 2024
85fc4bb
adapt pages
chrispader Apr 17, 2024
75b5cac
add patch for additional (onyx) props
chrispader Apr 18, 2024
1c60ee6
use PlatformStackScreenProps
chrispader Apr 18, 2024
1f78767
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 18, 2024
c5b5775
fix: lint errors
chrispader Apr 18, 2024
23b70c2
fix: pass generic parameter
chrispader Apr 18, 2024
a47a398
replace remaining stack navigators
chrispader Apr 18, 2024
289ba71
restructure styles
chrispader Apr 18, 2024
18fc893
improve platform navigation
chrispader Apr 18, 2024
3b40ab2
update custom navigator factories
chrispader Apr 18, 2024
0dbc9a7
adapt custom navigators
chrispader Apr 19, 2024
b3ec7ef
remove log
chrispader Apr 19, 2024
7ec5d05
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 19, 2024
8c4df3a
remove remaining references to native stack and stack directly
chrispader Apr 19, 2024
f33eba6
update pods
chrispader Apr 19, 2024
884627b
fix: order of animations
chrispader Apr 19, 2024
568cf4a
move files
chrispader Apr 19, 2024
eda54ab
remove Podfile changes
chrispader Apr 19, 2024
de68a31
remove unused defaultScreenOptions
chrispader Apr 19, 2024
f8dc036
update animations
chrispader Apr 19, 2024
e6aae18
add more animations
chrispader Apr 19, 2024
86a3af7
fix: remove animations from bottom tab navigator
chrispader Apr 19, 2024
69a534c
keyboardHandlingEnabled prop only on stack
chrispader Apr 19, 2024
9296237
add default screen options prop
chrispader Apr 19, 2024
346f4e6
remove stack animation props
chrispader Apr 19, 2024
8744c4b
add react import
chrispader Apr 19, 2024
210a95f
fix: bottom tab not working
chrispader Apr 19, 2024
96cd874
add more types
chrispader Apr 19, 2024
b4f3248
add transformScreenOptions function
chrispader Apr 19, 2024
5e453ba
adapt platform stack navigation
chrispader Apr 19, 2024
6e8a07d
rename types
chrispader Apr 19, 2024
57a3250
play around with animations
chrispader Apr 19, 2024
f937f54
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 20, 2024
5acaa45
update patch
chrispader Apr 20, 2024
a346076
fix: patch
chrispader Apr 20, 2024
256ee99
adapt responsive stack navigator
chrispader Apr 20, 2024
c9c2008
adapt
chrispader Apr 20, 2024
15b7689
rename generic parameters
chrispader Apr 20, 2024
48632e7
fix: react navigation types
chrispader Apr 20, 2024
6327d66
move navigators out of factory
chrispader Apr 20, 2024
1080e07
add defaultOptions to CustomBottomTabNavigator
chrispader Apr 20, 2024
6649b86
fix: animations
chrispader Apr 24, 2024
be6b3ed
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 24, 2024
32cfce4
simplify ResponsiveStackNavigator types
chrispader Apr 24, 2024
9f592f3
update Podfile.lock
chrispader Apr 24, 2024
850bb3d
fix: no animation on small screens
chrispader Apr 24, 2024
706dc61
simplify PlatformStackNavigation code
chrispader Apr 24, 2024
10e50c2
simplify ResponsiveStackNavigator
chrispader Apr 24, 2024
26a667a
update type names
chrispader Apr 24, 2024
1620f0c
fix: param
chrispader Apr 24, 2024
43f7848
simplify types
chrispader Apr 24, 2024
2fe3e72
simplify responsive stack navigator
chrispader Apr 24, 2024
85d015e
simplify Bottom tab navigator
chrispader Apr 24, 2024
00fa244
further improve logic of PlatformStackNaivgation
chrispader Apr 24, 2024
6d25042
simplify custom routers
chrispader Apr 24, 2024
56d210f
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 24, 2024
0dcb55e
improve types and add comments
chrispader Apr 24, 2024
8875023
update screen props type usage
chrispader Apr 24, 2024
4b40806
allow nativeOnly and webOnly options
chrispader Apr 24, 2024
a2f16c3
fix: defaultScreenOptions
chrispader Apr 24, 2024
b322da4
fix: last TS error
chrispader Apr 24, 2024
451ce65
fix: lint errors
chrispader Apr 24, 2024
ed39726
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 25, 2024
929c655
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 25, 2024
899f180
fix: navigation updating every render
chrispader Apr 25, 2024
549d0f1
fix: Podfile
chrispader Apr 25, 2024
5a35435
fix: React not found
chrispader Apr 25, 2024
22c0e16
simplify web animations
chrispader Apr 25, 2024
d78c8ed
update patches
chrispader Apr 25, 2024
8ba4ccc
add keyboardHandlingEnabled option to native stack
chrispader Apr 25, 2024
316d44f
use defaultScreenOptions
chrispader Apr 25, 2024
8a4524c
update defaultScreenOptions type
chrispader Apr 25, 2024
09a39b9
fix: bottom tab navigator transformState on native
chrispader Apr 25, 2024
3f094af
Merge branch 'main' into perf/native-stack-v2
chrispader Apr 26, 2024
7c04f3f
change iOS animation
chrispader Apr 26, 2024
26bc827
Merge branch 'main' into perf/native-stack-v2
kirillzyusko Apr 29, 2024
bd961fa
fix: crash when attempt to upload a photo
kirillzyusko Apr 29, 2024
d64570d
chore: update react-native-screens to latest version
kirillzyusko Apr 30, 2024
4292e59
Merge branch 'main' into perf/native-stack-v2
kirillzyusko May 2, 2024
552b978
fix: update lock files
kirillzyusko May 2, 2024
3d37d9d
fix: lint, typescript
kirillzyusko May 2, 2024
c443b1c
fix: typo
kirillzyusko May 6, 2024
fb718b7
fix: issue#4
kirillzyusko May 6, 2024
5cf5c71
Merge branch 'main' into perf/native-stack-v2
kirillzyusko May 7, 2024
1e61de8
fix: CI
kirillzyusko May 7, 2024
935e673
fix: post changes after merge
kirillzyusko May 7, 2024
36d426b
Merge branch 'main' into perf/native-stack-v2
kirillzyusko May 8, 2024
6076420
Merge branch 'main' into perf/native-stack-v2
kirillzyusko May 29, 2024
4142883
Merge branch 'main' into perf/native-stack-v2
kirillzyusko May 29, 2024
f6faabd
Merge branch 'main' into perf/native-stack-v2
chrispader Aug 28, 2024
3e1e8ca
Merge branch 'main' into perf/native-stack-v2
chrispader Aug 28, 2024
2b741ff
fix: merge conflict
chrispader Aug 28, 2024
d068e77
remove outdated file
chrispader Aug 28, 2024
87a9884
fix: TS errors
chrispader Aug 28, 2024
3d068bc
chore: remove Podfile.lock diff
chrispader Aug 28, 2024
4b04c4a
fix: memoize also on native
chrispader Aug 28, 2024
70a6d48
remove TODO comment
chrispader Aug 28, 2024
bea66c0
update web/native only navigation options and rename
chrispader Aug 28, 2024
91ee836
update styles based on recent navigation option rename
chrispader Aug 28, 2024
041262a
migrate stack navigator
chrispader Aug 28, 2024
7129a3c
use CustomRouter
chrispader Aug 28, 2024
239e6ea
extended @react-navigation/core patch
chrispader Aug 28, 2024
2968c26
simplify patch
chrispader Aug 28, 2024
cc81448
fix: patch
chrispader Aug 28, 2024
9aadd77
fix: patch
chrispader Aug 28, 2024
ac34ed9
fix: simplify platform stack logic
chrispader Aug 29, 2024
94c6ec2
simplify navigation option conversion
chrispader Aug 29, 2024
2442679
restructure types
chrispader Aug 29, 2024
5258724
Merge branch 'main' into perf/native-stack-v2
chrispader Aug 29, 2024
7684407
improve patch
chrispader Aug 29, 2024
625a00b
update patch
chrispader Aug 29, 2024
1a992c7
simplify types
chrispader Aug 29, 2024
f132d9c
update patch
chrispader Aug 29, 2024
b97e15a
fix: bottom stack always uses `slide_from_right` animation
chrispader Aug 29, 2024
30b5e48
move PlatformStackNavigatorComponent
chrispader Aug 29, 2024
05e7be0
fix: rename navigator components
chrispader Aug 29, 2024
9927faf
prioritize others over common navigation options
chrispader Aug 29, 2024
af97d99
fix: patch
chrispader Aug 29, 2024
a4effeb
restructure
chrispader Aug 29, 2024
1e4f480
add defaultScreenOptions for PlatformStackNavigator
chrispader Aug 29, 2024
fcb9849
use defaultScreenOptions on navigator
chrispader Aug 29, 2024
63c9f94
use defaultPlatformStackScreenOptions in ResponsiveStackNavigator
chrispader Aug 29, 2024
3ebddd8
add `ios_from_left` animation to `react-native-screens`
chrispader Aug 30, 2024
1dae4dd
use ios like animations on android
chrispader Aug 30, 2024
a07e571
fix: lint errors
chrispader Aug 30, 2024
9c85763
update RNS patch
chrispader Aug 30, 2024
e0a9fc0
update RNS patch
chrispader Aug 30, 2024
ed0c177
update RNS patch
chrispader Aug 30, 2024
1bd5a6a
update patch
chrispader Aug 30, 2024
ecd8b53
update RNS patch
chrispader Aug 30, 2024
e4be7cf
update RNS patch
chrispader Aug 30, 2024
24287b5
update patch
chrispader Sep 2, 2024
2fa23e3
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 3, 2024
5b1e5fb
fix: patch
chrispader Sep 3, 2024
a404e55
update patch
chrispader Sep 3, 2024
3ea4cdd
fix: patch (patch-package bug, renamed files lead to error when patch…
chrispader Sep 3, 2024
296afc1
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 23, 2024
d5e7497
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 23, 2024
b37e0a2
revert unintentional patch change
chrispader Sep 24, 2024
8d50c0c
fix: StackView import
chrispader Sep 24, 2024
8f1dc94
fix: eslint
chrispader Sep 24, 2024
d3c33c4
re-arrange options
chrispader Sep 24, 2024
0527250
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 24, 2024
b90ba70
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 25, 2024
75c40fb
fix: wrong replacements
chrispader Sep 25, 2024
6db8b60
fix: lint
chrispader Sep 25, 2024
0e9cbfd
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 25, 2024
234e91e
disable gesture for no animation screens
chrispader Sep 25, 2024
b7155b1
fix: animation wrong direction in modals
chrispader Sep 25, 2024
c4639ab
update RouteProp types
chrispader Sep 26, 2024
3f4280d
move type
chrispader Sep 26, 2024
88cbda4
fix: missing prop
chrispader Sep 26, 2024
7d7823d
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 29, 2024
fb5a17d
fix: VisionCamera fabric bug, deinit camera session on screen unmount
chrispader Sep 30, 2024
ce4f8c6
update Podfile.lock
chrispader Sep 30, 2024
5701c46
Merge branch 'main' into perf/native-stack-v2
chrispader Sep 30, 2024
d3a407d
revert Podfile.lock changes
chrispader Sep 30, 2024
d3433c4
Merge branch 'main' into @chrispader/use-platform-stack-navigation-in…
chrispader Sep 30, 2024
30cb45e
Merge branch 'main' into @chrispader/use-platform-stack-navigation-in…
chrispader Sep 30, 2024
912f01a
fix: root navigator screen options
chrispader Sep 30, 2024
580071a
Merge branch 'main' into @chrispader/use-platform-stack-navigation-in…
chrispader Sep 30, 2024
ddb1ab6
fix: missing react import
chrispader Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"@react-native-picker/picker": "2.7.6",
"@react-navigation/material-top-tabs": "^6.6.3",
"@react-navigation/native": "6.1.12",
"@react-navigation/native-stack": "^6.9.26",
"@react-navigation/stack": "6.3.29",
"@react-ng/bounds-observer": "^0.2.1",
"@rnmapbox/maps": "10.1.30",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ index 0000000..46c2c2c
+#endif /* RCT_NEW_ARCH_ENABLED */
diff --git a/node_modules/react-native-vision-camera/ios/RNCameraView.mm b/node_modules/react-native-vision-camera/ios/RNCameraView.mm
new file mode 100644
index 0000000..019be20
index 0000000..b90427e
--- /dev/null
+++ b/node_modules/react-native-vision-camera/ios/RNCameraView.mm
@@ -0,0 +1,377 @@
Expand Down Expand Up @@ -1384,7 +1384,7 @@ index 0000000..019be20
+
+ //The remaining part of the initializer is standard Objective-C code to create views and layout them with AutoLayout. Here we can change whatever we want to.
+ _view = [[CameraView alloc] init];
+ _view.delegate = self;
+ _view.delegate = self;
+
+ self.contentView = _view;
+}
Expand All @@ -1397,9 +1397,9 @@ index 0000000..019be20
+{
+ const auto &newViewProps = *std::static_pointer_cast<CameraViewProps const>(props);
+ const auto &oldViewProps = *std::static_pointer_cast<CameraViewProps const>(_props);
+
+
+ NSMutableArray* changedProps = [[NSMutableArray alloc] init];
+
+
+ if(oldViewProps.isActive != newViewProps.isActive){
+ _view.isActive = newViewProps.isActive;
+ [changedProps addObject:@"isActive"];
Expand Down Expand Up @@ -1496,12 +1496,12 @@ index 0000000..019be20
+ _view.enableFpsGraph = newViewProps.enableFpsGraph;
+ [changedProps addObject:@"enableFpsGraph"];
+ }
+
+
+
+
+ if(_view.format == nil){
+ _view.format =[ [NSMutableDictionary alloc] init];
+ }
+
+
+
+ //Checking format props, TODO: find cleaner way to do it
+ if(oldViewProps.format.supportsDepthCapture != newViewProps.format.supportsDepthCapture){
Expand All @@ -1521,7 +1521,7 @@ index 0000000..019be20
+ [_view.format setValue:newPixelFormats forKey:@"pixelFormats"];
+ [changedProps addObject:@"format"];
+ }
+
+
+ if(oldViewProps.format.videoStabilizationModes.size() != newViewProps.format.videoStabilizationModes.size()){
+ NSMutableArray* newVideoStabilizationModes = [[NSMutableArray alloc] init];
+ for(int i = 0; i < newViewProps.format.videoStabilizationModes.size(); i++){
Expand All @@ -1530,7 +1530,7 @@ index 0000000..019be20
+ [_view.format setValue:newVideoStabilizationModes forKey:@"videoStabilizationModes"];
+ [changedProps addObject:@"format"];
+ }
+
+
+ if(oldViewProps.format.photoHeight != newViewProps.format.photoHeight){
+ [_view.format setValue:[NSNumber numberWithDouble:newViewProps.format.photoHeight] forKey:@"photoHeight"];
+ [changedProps addObject:@"format"];
Expand Down Expand Up @@ -1578,11 +1578,11 @@ index 0000000..019be20
+ [_view.format setValue:supportsPhotoHDR forKey:@"supportsPhotoHDR"];
+ [changedProps addObject:@"format"];
+ }
+
+
+ if (_view.format.count == 0) {
+ _view.format = nil;
+ }
+
+
+ if(_view.codeScannerOptions == nil){
+ _view.codeScannerOptions =[[NSMutableDictionary alloc] init];
+ }
Expand All @@ -1595,12 +1595,12 @@ index 0000000..019be20
+ [_view.codeScannerOptions setValue:newCodeTypes forKey:@"codeTypes"];
+ [changedProps addObject:@"codeScannerOptions"];
+ }
+
+
+ if(oldViewProps.codeScannerOptions.interval != newViewProps.codeScannerOptions.interval){
+ [_view.codeScannerOptions setValue:[NSNumber numberWithDouble:newViewProps.codeScannerOptions.interval] forKey:@"interval"];
+ [changedProps addObject:@"codeScannerOptions"];
+ }
+
+
+ if(
+ oldViewProps.codeScannerOptions.regionOfInterest.x != newViewProps.codeScannerOptions.regionOfInterest.x ||
+ oldViewProps.codeScannerOptions.regionOfInterest.y != newViewProps.codeScannerOptions.regionOfInterest.y ||
Expand All @@ -1616,7 +1616,7 @@ index 0000000..019be20
+ [_view.codeScannerOptions setValue:newRegionOfInterest forKey:@"regionOfInterest"];
+ [changedProps addObject:@"codeScannerOptions"];
+ }
+
+
+ if (_view.codeScannerOptions.count == 0) {
+ _view.codeScannerOptions = nil;
+ }
Expand Down Expand Up @@ -2005,25 +2005,6 @@ index 0000000..e47e42f
@@ -0,0 +1 @@
+{"version":3,"file":"CameraViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/specs/CameraViewNativeComponent.ts"],"names":[],"mappings":";;AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAGnG,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAEnE,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,cAAc,EAAE,O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,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,aAAa,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,kBAAkB,CAC1B,QAAQ,CAAC;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,QAAQ,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACrF,CAAC,CACH,CAAC;IACF,WAAW,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/C;;AAED,wBAAiE"}
\ No newline at end of file
diff --git a/node_modules/react-native-vision-camera/package.json b/node_modules/react-native-vision-camera/package.json
index 86352fa..7af9577 100644
--- a/node_modules/react-native-vision-camera/package.json
+++ b/node_modules/react-native-vision-camera/package.json
@@ -166,5 +166,13 @@
]
]
},
- "packageManager": "[email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
+ "codegenConfig": {
+ "name": "RNVisioncameraSpec",
+ "type": "all",
+ "jsSrcsDir": "./src/specs",
+ "android": {
+ "javaPackageName": "com.mrousavy.camera"
+ }
+ },
+ "packageManager": "[email protected]"
}
diff --git a/node_modules/react-native-vision-camera/src/Camera.tsx b/node_modules/react-native-vision-camera/src/Camera.tsx
index 18733ba..1668322 100644
--- a/node_modules/react-native-vision-camera/src/Camera.tsx
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
diff --git a/node_modules/react-native-vision-camera/ios/RNCameraView.mm b/node_modules/react-native-vision-camera/ios/RNCameraView.mm
index b90427e..feccc33 100644
--- a/node_modules/react-native-vision-camera/ios/RNCameraView.mm
+++ b/node_modules/react-native-vision-camera/ios/RNCameraView.mm
@@ -34,26 +34,46 @@ + (ComponentDescriptorProvider)componentDescriptorProvider
return concreteComponentDescriptorProvider<CameraViewComponentDescriptor>();
}

+- (void) initCamera {
+ static const auto defaultProps = std::make_shared<const CameraViewProps>();
+ _props = defaultProps;
+
+ //The remaining part of the initializer is standard Objective-C code to create views and layout them with AutoLayout. Here we can change whatever we want to.
+ _view = [[CameraView alloc] init];
+ _view.delegate = self;
+
+ self.contentView = _view;
+}
+
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
-if (self) {
- static const auto defaultProps = std::make_shared<const CameraViewProps>();
- _props = defaultProps;
+ if (self) {
+ [self initCamera];
+ }
+ return self;
+}
+

- //The remaining part of the initializer is standard Objective-C code to create views and layout them with AutoLayout. Here we can change whatever we want to.
- _view = [[CameraView alloc] init];
- _view.delegate = self;
+- (void) prepareForRecycle {
+ [super prepareForRecycle];

- self.contentView = _view;
+ _view.delegate = nil;
+ _view = nil;
+ self.contentView = nil;
}

-return self;
+- (void) updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetrics oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics {
+ [super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics];
}

// why we need this func -> https://reactnative.dev/docs/next/the-new-architecture/pillars-fabric-components#write-the-native-ios-code
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
{
+ if (_view == nil) {
+ [self initCamera];
+ }
+
const auto &newViewProps = *std::static_pointer_cast<CameraViewProps const>(props);
const auto &oldViewProps = *std::static_pointer_cast<CameraViewProps const>(_props);

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type {RouteProp} from '@react-navigation/native';
import {useRoute} from '@react-navigation/native';
import lodashSortBy from 'lodash/sortBy';
import truncate from 'lodash/truncate';
Expand Down Expand Up @@ -29,6 +28,7 @@ import * as CurrencyUtils from '@libs/CurrencyUtils';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as IOUUtils from '@libs/IOUUtils';
import Navigation from '@libs/Navigation/Navigation';
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {TransactionDuplicateNavigatorParamList} from '@libs/Navigation/types';
import * as OptionsListUtils from '@libs/OptionsListUtils';
import * as ReceiptUtils from '@libs/ReceiptUtils';
Expand Down Expand Up @@ -76,7 +76,7 @@ function MoneyRequestPreviewContent({
const StyleUtils = useStyleUtils();
const {translate} = useLocalize();
const {windowWidth} = useWindowDimensions();
const route = useRoute<RouteProp<TransactionDuplicateNavigatorParamList, typeof SCREENS.TRANSACTION_DUPLICATE.REVIEW>>();
const route = useRoute<PlatformStackRouteProp<TransactionDuplicateNavigatorParamList, typeof SCREENS.TRANSACTION_DUPLICATE.REVIEW>>();
const {shouldUseNarrowLayout} = useResponsiveLayout();

const sessionAccountID = session?.accountID;
Expand Down
6 changes: 3 additions & 3 deletions src/components/ScreenWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {useIsFocused, useNavigation} from '@react-navigation/native';
import type {StackNavigationProp} from '@react-navigation/stack';
import type {ForwardedRef, ReactNode} from 'react';
import React, {createContext, forwardRef, useEffect, useMemo, useRef, useState} from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
Expand All @@ -15,6 +14,7 @@ import useTackInputFocus from '@hooks/useTackInputFocus';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as Browser from '@libs/Browser';
import type {PlatformStackNavigationProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {AuthScreensParamList, RootStackParamList} from '@libs/Navigation/types';
import toggleTestToolsModal from '@userActions/TestTool';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -96,7 +96,7 @@ type ScreenWrapperProps = {
*
* This is required because transitionEnd event doesn't trigger in the testing environment.
*/
navigation?: StackNavigationProp<RootStackParamList> | StackNavigationProp<AuthScreensParamList>;
navigation?: PlatformStackNavigationProp<RootStackParamList> | PlatformStackNavigationProp<AuthScreensParamList>;

/** Whether to show offline indicator on wide screens */
shouldShowOfflineIndicatorInWideScreen?: boolean;
Expand Down Expand Up @@ -141,7 +141,7 @@ function ScreenWrapper(
* so in other places where ScreenWrapper is used, we need to
* fallback to useNavigation.
*/
const navigationFallback = useNavigation<StackNavigationProp<RootStackParamList>>();
const navigationFallback = useNavigation<PlatformStackNavigationProp<RootStackParamList>>();
const navigation = navigationProp ?? navigationFallback;
const isFocused = useIsFocused();
const {windowHeight} = useWindowDimensions(shouldUseCachedViewportHeight);
Expand Down
9 changes: 5 additions & 4 deletions src/components/ScrollOffsetContextProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type {ParamListBase, RouteProp} from '@react-navigation/native';
import type {ParamListBase} from '@react-navigation/native';
import React, {createContext, useCallback, useEffect, useMemo, useRef} from 'react';
import {withOnyx} from 'react-native-onyx';
import usePrevious from '@hooks/usePrevious';
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {NavigationPartialRoute, State} from '@libs/Navigation/types';
import NAVIGATORS from '@src/NAVIGATORS';
import ONYXKEYS from '@src/ONYXKEYS';
Expand All @@ -10,10 +11,10 @@ import type {PriorityMode} from '@src/types/onyx';

type ScrollOffsetContextValue = {
/** Save scroll offset of flashlist on given screen */
saveScrollOffset: (route: RouteProp<ParamListBase>, scrollOffset: number) => void;
saveScrollOffset: (route: PlatformStackRouteProp<ParamListBase>, scrollOffset: number) => void;

/** Get scroll offset value for given screen */
getScrollOffset: (route: RouteProp<ParamListBase>) => number | undefined;
getScrollOffset: (route: PlatformStackRouteProp<ParamListBase>) => number | undefined;

/** Clean scroll offsets of screen that aren't anymore in the state */
cleanStaleScrollOffsets: (state: State) => void;
Expand All @@ -38,7 +39,7 @@ const defaultValue: ScrollOffsetContextValue = {
const ScrollOffsetContext = createContext<ScrollOffsetContextValue>(defaultValue);

/** This function is prepared to work with HOME screens. May need modification if we want to handle other types of screens. */
function getKey(route: RouteProp<ParamListBase> | NavigationPartialRoute): string {
function getKey(route: PlatformStackRouteProp<ParamListBase> | NavigationPartialRoute): string {
if (route.params && 'policyID' in route.params && typeof route.params.policyID === 'string') {
return `${route.name}-${route.params.policyID}`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {useNavigation} from '@react-navigation/native';
import type {StackNavigationProp} from '@react-navigation/stack';
import React, {useCallback, useEffect, useRef, useState} from 'react';
import {View} from 'react-native';
import type {NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle} from 'react-native';
Expand All @@ -20,6 +19,7 @@ import * as SearchActions from '@libs/actions/Search';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import Log from '@libs/Log';
import memoize from '@libs/memoize';
import type {PlatformStackNavigationProp} from '@libs/Navigation/PlatformStackNavigation/types';
import * as ReportUtils from '@libs/ReportUtils';
import * as SearchUtils from '@libs/SearchUtils';
import Navigation from '@navigation/Navigation';
Expand Down Expand Up @@ -81,7 +81,7 @@ function Search({queryJSON, onSearchListScroll, contentContainerStyle}: SearchPr
const {shouldUseNarrowLayout} = useResponsiveLayout();
const styles = useThemeStyles();
const {isSmallScreenWidth, isLargeScreenWidth} = useResponsiveLayout();
const navigation = useNavigation<StackNavigationProp<AuthScreensParamList>>();
const navigation = useNavigation<PlatformStackNavigationProp<AuthScreensParamList>>();
const lastSearchResultsRef = useRef<OnyxEntry<SearchResults>>();
const {setCurrentSearchHash, setSelectedTransactions, selectedTransactions, clearSelectedTransactions, setShouldShowStatusBarLoading} = useSearchContext();
const {selectionMode} = useMobileSelectionMode();
Expand Down
Loading
Loading