KjellConnelly / react-native-rate

Send your app users to Apple App Store, Google Play, Amazon, or other using the newest APIs
635 stars 100 forks source link

Always give callback a success boolean #77

Closed benlaverriere closed 2 years ago

benlaverriere commented 3 years ago

Ideally, I'd love to see https://github.com/KjellConnelly/react-native-rate/pull/74 land, for more detailed success/error reporting! Thanks to the author of that PR for putting it together.

But in the meantime, I noticed that our callback was receiving no success boolean in production, on Android. From tracing the code, this is the only case I could identify in which callback wouldn't get an arg (in JS or in native). We do currently have openAppStoreIfInAppFails set to false.

If there's another way to address, please let me know. This would be the only place we call callback with an explicit argument in JS rather than a value raised from native code, but I think it's worth it to make things clearer to calling code.

KjellConnelly commented 2 years ago

Better late than never lol