properly store attendee statuses

This commit is contained in:
tibbi 2019-03-20 11:56:38 +01:00
parent 389b50c553
commit adf5a45810
2 changed files with 3 additions and 2 deletions

View File

@ -1312,6 +1312,8 @@ class EventActivity : SimpleActivity() {
beVisibleIf(attendee.showStatusImage())
setImageDrawable(getAttendeeStatusImage(attendee))
}
mAttendees.firstOrNull { it.name == ATTENDEE_ME }?.status = attendee.status
}
}
@ -1324,7 +1326,6 @@ class EventActivity : SimpleActivity() {
private fun getAllAttendees(): String {
var attendees = ArrayList<Attendee>()
mSelectedContacts.forEach {
it.status = CalendarContract.Attendees.ATTENDEE_STATUS_INVITED
attendees.add(it)
}

View File

@ -368,7 +368,7 @@ class CalDAVHelper(val context: Context) {
val contentValues = ContentValues().apply {
put(CalendarContract.Attendees.ATTENDEE_NAME, it.name)
put(CalendarContract.Attendees.ATTENDEE_EMAIL, it.email)
put(CalendarContract.Attendees.ATTENDEE_STATUS, CalendarContract.Attendees.ATTENDEE_STATUS_ACCEPTED)
put(CalendarContract.Attendees.ATTENDEE_STATUS, it.status)
put(CalendarContract.Attendees.EVENT_ID, event.getCalDAVEventId())
}