tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
394 stars 70 forks source link

feat: `getEmailClients` method + `openComposer` accepting pre-selected `app` #130

Closed danielmark0116 closed 7 months ago

danielmark0116 commented 8 months ago

What this PR does?

Thanks for the library!

I recently needed to develop a feature with a list of all available email apps on given device. Your library helped a lot, thanks for that!

BUT! the list needed to be put within some custom UI thus I needed to extend the API and decided to create a PR with my changes, maybe it could be useful for others!

Let me know what you think and if it is a good addition to the library / if anythings needs some tweaking

Have a good day, cheers!

danielmark0116 commented 7 months ago

Hi!

Yeah, true. It would be better DX not to have two different values to operate on.

Let's go with you suggestion then, which would be:

Wdyt? :)

tschoffelen commented 7 months ago

Yes sounds perfect!

I agree keeping packageName and app around as well makes sense, although maybe we should give them platform specific names (androidPackageName, iosAppName?)

danielmark0116 commented 7 months ago

Yup! I will push the changes soon then! :)

tschoffelen commented 7 months ago

Amazing, thank you!

danielmark0116 commented 7 months ago

Just FIY - pushed the changes. I will do some QA later today as well.

Once I am done with QA, I will re-request review :)

tschoffelen commented 7 months ago

Sorry, only saw that comment after I reviewed - let me know once you have QA'd, and I'd be happy to get this merged and released!

danielmark0116 commented 7 months ago

Hi @tschoffelen!

Made a quick test on iOS and Android with the new API and it seems that everything is ok! We can merge if you feel like it! :)

Have a great day!

tschoffelen commented 7 months ago

Thanks again for your work on this @danielmark0116!

Released to NPM as react-native-email-link@1.15.0

danielmark0116 commented 7 months ago

Thank you as well @tschoffelen! :) Cheers!