Open tudiantuan opened 3 years ago
+1
This shows as unhandled for me in bugsnag but it's not a crash. It's because the promise is not returned from js.
patch...
diff --git a/node_modules/react-native-navigation-bar-color/src/index.js b/node_modules/react-native-navigation-bar-color/src/index.js
index eeab32f..edc4ce0 100644
--- a/node_modules/react-native-navigation-bar-color/src/index.js
+++ b/node_modules/react-native-navigation-bar-color/src/index.js
@@ -9,7 +9,7 @@ const changeNavigationBarColor = (
) => {
if (Platform.OS === 'android') {
const LightNav = light ? true : false;
- NavigationBarColor.changeNavigationBarColor(color, LightNav, animated);
+ return NavigationBarColor.changeNavigationBarColor(color, LightNav, animated);
}
};
const hideNavigationBar = () => {
@@ -21,7 +21,7 @@ const hideNavigationBar = () => {
};
const showNavigationBar = () => {
if (Platform.OS === 'android') {
- NavigationBarColor.showNavigationBar();
+ return NavigationBarColor.showNavigationBar();
} else {
return false;
}
shall we open a PR with this change @MorganTrudeau ? I can do it
oh, I see that there's a PR already (#37 ) and an issue #36
I recive report ErrorNavigationBarColorModule.java:8 Tried to change the navigation bar while not attached to an Activity. Model Galaxy S10 5G (SM-G977N)