-
Notifications
You must be signed in to change notification settings - Fork 249
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
Implement Mailer#canSend #51
base: master
Are you sure you want to change the base?
Conversation
```js | ||
var Mailer = require('NativeModules').RNMail; | ||
|
||
Mailer.canSend((error, canSend) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like error in the callback is always null. Seems like outcome canSend
is always true or false. maybe keep the apis Mailer.canSend(canSend => {});
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but I wanted to stick to the error-first callback convention. I think this is more valuable than saving an argument.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would prefer to follow rn convention over node. refer: https://github.com/facebook/react-native/blob/4a893ee071f76377a678fe9774190397f636598a/Libraries/CameraRoll/RCTImagePickerManager.m#L49
Hey, I need this ability too, is this something that is going to be? |
@martijndeh can you update? |
@chirag04 is it possible to merge this? |
I need a way to check if the user is able to send a mail. Please let me know if you have any feedback.