show existing event attendee photos, if available

This commit is contained in:
tibbi 2019-03-15 11:54:44 +01:00
parent 1ac25c4dad
commit eda6c792b7

View file

@ -1149,7 +1149,12 @@ class EventActivity : SimpleActivity() {
private fun updateAttendees() {
mAttendees.forEach {
addAttendee(it)
val attendee = it
val deviceContact = mAvailableContacts.firstOrNull { it.email.isNotEmpty() && it.email == attendee.email && it.photoUri.isNotEmpty() }
if (deviceContact != null) {
attendee.photoUri = deviceContact.photoUri
}
addAttendee(attendee)
}
addAttendee()