hybrid-navigation 2.12.2 → 2.12.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.
- package/android/src/main/java/com/reactnative/hybridnavigation/HBDEventEmitter.java +1 -0
- package/android/src/main/java/com/reactnative/hybridnavigation/navigator/ScreenNavigator.java +6 -6
- package/ios/HybridNavigation/GlobalStyle.m +5 -7
- package/ios/HybridNavigation/HBDUtils.h +5 -5
- package/package.json +1 -1
package/android/src/main/java/com/reactnative/hybridnavigation/navigator/ScreenNavigator.java
CHANGED
|
@@ -150,20 +150,20 @@ public class ScreenNavigator implements Navigator {
|
|
|
150
150
|
|
|
151
151
|
private void handleHideModal(@NonNull AwesomeFragment target, @NonNull Promise promise) {
|
|
152
152
|
AwesomeFragment presenting = target.getPresentingFragment();
|
|
153
|
-
if (presenting
|
|
154
|
-
|
|
153
|
+
if (presenting != null) {
|
|
154
|
+
presenting.dismissFragment(() -> promise.resolve(true), TransitionAnimation.Fade);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
target.dismissFragment(() -> promise.resolve(true), TransitionAnimation.Fade);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
private void handleDismiss(@NonNull AwesomeFragment target, @NonNull Promise promise) {
|
|
161
161
|
AwesomeFragment presenting = target.getPresentingFragment();
|
|
162
|
-
if (presenting
|
|
163
|
-
|
|
162
|
+
if (presenting != null) {
|
|
163
|
+
presenting.dismissFragment(() -> promise.resolve(true));
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
target.dismissFragment(() -> promise.resolve(true));
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
private void handlePresent(@NonNull AwesomeFragment target, @NonNull ReadableMap extras, @NonNull Promise promise) {
|
|
@@ -38,7 +38,11 @@
|
|
|
38
38
|
|
|
39
39
|
@end
|
|
40
40
|
|
|
41
|
-
@implementation GlobalStyle
|
|
41
|
+
@implementation GlobalStyle {
|
|
42
|
+
UIColor *_barTintColor;
|
|
43
|
+
UIColor *_tintColor;
|
|
44
|
+
UIColor *_titleTextColor;
|
|
45
|
+
}
|
|
42
46
|
|
|
43
47
|
static GlobalStyle *globalStyle;
|
|
44
48
|
|
|
@@ -279,8 +283,6 @@ static GlobalStyle *globalStyle;
|
|
|
279
283
|
}
|
|
280
284
|
}
|
|
281
285
|
|
|
282
|
-
@synthesize barTintColor = _barTintColor;
|
|
283
|
-
|
|
284
286
|
- (void)setBarTintColor:(UIColor *)barTintColor {
|
|
285
287
|
_barTintColor = barTintColor;
|
|
286
288
|
_barTintColorDarkContent = barTintColor;
|
|
@@ -311,8 +313,6 @@ static GlobalStyle *globalStyle;
|
|
|
311
313
|
return UIColor.blackColor;
|
|
312
314
|
}
|
|
313
315
|
|
|
314
|
-
@synthesize tintColor = _tintColor;
|
|
315
|
-
|
|
316
316
|
- (void)setTintColor:(UIColor *)tintColor {
|
|
317
317
|
_tintColor = tintColor;
|
|
318
318
|
_tintColorDarkContent = tintColor;
|
|
@@ -343,8 +343,6 @@ static GlobalStyle *globalStyle;
|
|
|
343
343
|
return UIColor.whiteColor;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
@synthesize titleTextColor = _titleTextColor;
|
|
347
|
-
|
|
348
346
|
- (void)setTitleTextColor:(UIColor *)titleTextColor {
|
|
349
347
|
_titleTextColor = titleTextColor;
|
|
350
348
|
_titleTextColorDarkContent = titleTextColor;
|
|
@@ -29,13 +29,13 @@ UIKIT_STATIC_INLINE BOOL imageHasAlphaChannel(UIImage *image) {
|
|
|
29
29
|
alpha == kCGImageAlphaPremultipliedLast);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
UIKIT_STATIC_INLINE void hbd_exchangeImplementations(Class
|
|
33
|
-
Method originalMethod = class_getInstanceMethod(
|
|
34
|
-
Method swizzledMethod = class_getInstanceMethod(
|
|
32
|
+
UIKIT_STATIC_INLINE void hbd_exchangeImplementations(Class klass, SEL originalSelector, SEL swizzledSelector) {
|
|
33
|
+
Method originalMethod = class_getInstanceMethod(klass, originalSelector);
|
|
34
|
+
Method swizzledMethod = class_getInstanceMethod(klass, swizzledSelector);
|
|
35
35
|
|
|
36
|
-
BOOL success = class_addMethod(
|
|
36
|
+
BOOL success = class_addMethod(klass, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod));
|
|
37
37
|
if (success) {
|
|
38
|
-
class_replaceMethod(
|
|
38
|
+
class_replaceMethod(klass, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
|
|
39
39
|
} else {
|
|
40
40
|
method_exchangeImplementations(originalMethod, swizzledMethod);
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hybrid-navigation",
|
|
3
3
|
"description": "React Native Navigation that supports seamless navigation between Native and React.",
|
|
4
|
-
"version": "2.12.
|
|
4
|
+
"version": "2.12.3",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
7
7
|
"react-native": "src/index",
|