-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
@mczernek/expo sms/handle empty addresses array #3656
@mczernek/expo sms/handle empty addresses array #3656
Conversation
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.
Thanks for taking care of this, congratulations on your first pull request! 🎉
packages/expo-sms/android/src/main/java/expo/modules/sms/SMSModule.java
Outdated
Show resolved
Hide resolved
packages/expo-sms/android/src/main/java/expo/modules/sms/SMSModule.java
Outdated
Show resolved
Hide resolved
packages/expo-sms/android/src/main/java/expo/modules/sms/SMSModule.java
Outdated
Show resolved
Hide resolved
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.
Nice! Congrats on the first PR 😉
packages/expo-sms/android/src/main/java/expo/modules/sms/SMSModule.java
Outdated
Show resolved
Hide resolved
packages/expo-sms/android/src/main/java/expo/modules/sms/SMSModule.java
Outdated
Show resolved
Hide resolved
private String constructRecipients(List<String> addresses) { | ||
if (addresses.size() > 0) { | ||
final StringBuilder addressesBuilder = new StringBuilder(addresses.get(0)); | ||
for (String address: addresses) { |
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.
for (String address: addresses) { | |
for (String address : addresses) { |
I would suggest configuring Android Studio to format files on save. It has some downsides, like there are files in the project that aren't formatted and editing them will lead to unnecessary changes, but apart from that it's the easiest way to make sure files are formatted properly.
Why
THis fixes issue #2673 on Android, and provides consistent behavior for sending SMSes with empty addresses list between Android and iOS.
Test Plan
SMSScreen in ncl now supports this scenario.