Merge pull request #1608
Don't try to show invalid mail addresses in recipient selector Fixes #1607
This commit is contained in:
commit
521c9129a5
2 changed files with 10 additions and 4 deletions
|
@ -238,12 +238,14 @@ public class RecipientLoader extends AsyncTaskLoader<List<Recipient>> {
|
|||
}
|
||||
}
|
||||
|
||||
Uri photoUri = cursor.isNull(INDEX_PHOTO_URI) ? null : Uri.parse(cursor.getString(INDEX_PHOTO_URI));
|
||||
Recipient recipient = new Recipient(name, email, addressLabel, contactId, lookupKey);
|
||||
recipient.photoThumbnailUri = photoUri;
|
||||
if (recipient.isValidEmailAddress()) {
|
||||
Uri photoUri = cursor.isNull(INDEX_PHOTO_URI) ? null : Uri.parse(cursor.getString(INDEX_PHOTO_URI));
|
||||
|
||||
recipientMap.put(email, recipient);
|
||||
recipients.add(recipient);
|
||||
recipient.photoThumbnailUri = photoUri;
|
||||
recipientMap.put(email, recipient);
|
||||
recipients.add(recipient);
|
||||
}
|
||||
}
|
||||
|
||||
cursor.close();
|
||||
|
|
|
@ -550,6 +550,10 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
|
|||
return address.getAddress();
|
||||
}
|
||||
|
||||
public boolean isValidEmailAddress() {
|
||||
return (address.getAddress() != null);
|
||||
}
|
||||
|
||||
public String getDisplayNameOrUnknown(Context context) {
|
||||
String displayName = getDisplayName();
|
||||
if (displayName != null) {
|
||||
|
|
Loading…
Reference in a new issue