sort attendees by status in a specific way
This commit is contained in:
parent
7d0e46705f
commit
ed7e90e17d
|
@ -1148,6 +1148,13 @@ class EventActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateAttendees() {
|
private fun updateAttendees() {
|
||||||
|
mAttendees.sortWith(compareBy<Attendee>
|
||||||
|
{ it.status == CalendarContract.Attendees.ATTENDEE_STATUS_ACCEPTED }.thenBy
|
||||||
|
{ it.status == CalendarContract.Attendees.ATTENDEE_STATUS_DECLINED }.thenBy
|
||||||
|
{ it.status == CalendarContract.Attendees.ATTENDEE_STATUS_TENTATIVE }.thenBy
|
||||||
|
{ it.status })
|
||||||
|
mAttendees.reverse()
|
||||||
|
|
||||||
mAttendees.forEach {
|
mAttendees.forEach {
|
||||||
val attendee = it
|
val attendee = it
|
||||||
val deviceContact = mAvailableContacts.firstOrNull { it.email.isNotEmpty() && it.email == attendee.email && it.photoUri.isNotEmpty() }
|
val deviceContact = mAvailableContacts.firstOrNull { it.email.isNotEmpty() && it.email == attendee.email && it.photoUri.isNotEmpty() }
|
||||||
|
|
Loading…
Reference in New Issue