@lodev09/react-native-true-sheet 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -300,10 +300,10 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
dialog.setOnCancelListener {
|
|
303
|
+
delegate?.viewControllerWillDismiss()
|
|
304
|
+
|
|
303
305
|
// Notify parent sheet that it is about to regain focus
|
|
304
306
|
parentSheetView?.viewControllerWillFocus()
|
|
305
|
-
|
|
306
|
-
delegate?.viewControllerWillDismiss()
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
dialog.setOnDismissListener {
|
package/ios/TrueSheetView.mm
CHANGED
|
@@ -471,12 +471,12 @@ using namespace facebook::react;
|
|
|
471
471
|
if (!rootViewController)
|
|
472
472
|
return nil;
|
|
473
473
|
|
|
474
|
-
// Find topmost presented view controller
|
|
474
|
+
// Find topmost presented view controller that is not being dismissed
|
|
475
475
|
while (rootViewController.presentedViewController) {
|
|
476
476
|
UIViewController *presented = rootViewController.presentedViewController;
|
|
477
477
|
|
|
478
|
-
// Skip
|
|
479
|
-
if (
|
|
478
|
+
// Skip any view controller that is being dismissed
|
|
479
|
+
if (presented.isBeingDismissed) {
|
|
480
480
|
break;
|
|
481
481
|
}
|
|
482
482
|
rootViewController = presented;
|
|
@@ -193,19 +193,19 @@
|
|
|
193
193
|
_isPresented = NO;
|
|
194
194
|
_activeDetentIndex = -1;
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if ([_parentSheetController.delegate respondsToSelector:@selector(viewControllerWillFocus)]) {
|
|
199
|
-
[_parentSheetController.delegate viewControllerWillFocus];
|
|
200
|
-
}
|
|
196
|
+
if ([self.delegate respondsToSelector:@selector(viewControllerWillDismiss)]) {
|
|
197
|
+
[self.delegate viewControllerWillDismiss];
|
|
201
198
|
}
|
|
202
199
|
|
|
203
200
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
204
201
|
[self emitChangePositionDelegateWithPosition:self.currentPosition realtime:NO];
|
|
205
202
|
});
|
|
206
203
|
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
// Notify the parent sheet (if any) that it is about to regain focus
|
|
205
|
+
if (_parentSheetController) {
|
|
206
|
+
if ([_parentSheetController.delegate respondsToSelector:@selector(viewControllerWillFocus)]) {
|
|
207
|
+
[_parentSheetController.delegate viewControllerWillFocus];
|
|
208
|
+
}
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lodev09/react-native-true-sheet",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "The true native bottom sheet experience for your React Native Apps.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"tidy": "yarn typecheck && yarn lint && yarn format && scripts/objclint.sh && scripts/ktlint.sh",
|
|
42
42
|
"clean": "scripts/clean.sh",
|
|
43
43
|
"prepare": "bob build",
|
|
44
|
-
"release": "release-it",
|
|
44
|
+
"release": "release-it --only-version",
|
|
45
45
|
"release:beta": "yarn release --preRelease=beta"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|