Skip to content
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

Merged
merged 8 commits into from
Mar 6, 2019

Conversation

mczernek
Copy link
Contributor

@mczernek mczernek commented Mar 5, 2019

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.

@mczernek mczernek self-assigned this Mar 5, 2019
Copy link
Contributor

@sjchmiela sjchmiela left a 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! 🎉

Copy link
Member

@tsapeta tsapeta left a 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 😉

private String constructRecipients(List<String> addresses) {
if (addresses.size() > 0) {
final StringBuilder addressesBuilder = new StringBuilder(addresses.get(0));
for (String address: addresses) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

CHANGELOG.md Outdated Show resolved Hide resolved
@sjchmiela sjchmiela merged commit eeb907b into master Mar 6, 2019
@sjchmiela sjchmiela deleted the @mczernek/expo-sms/handle-empty-addresses-array branch April 1, 2019 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants