mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2024-12-25 07:50:56 +01:00
avoid adding myself to the events twice
This commit is contained in:
parent
2a9c368329
commit
92ec9e29f6
@ -1344,6 +1344,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
if (mEvent.id == null && isSavingEvent && attendees.isNotEmpty()) {
|
if (mEvent.id == null && isSavingEvent && attendees.isNotEmpty()) {
|
||||||
val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId }
|
val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId }
|
||||||
mAvailableContacts.firstOrNull { it.email == currentCalendar?.accountName }?.apply {
|
mAvailableContacts.firstOrNull { it.email == currentCalendar?.accountName }?.apply {
|
||||||
|
attendees = attendees.filter { it.email != currentCalendar?.accountName }.toMutableList() as ArrayList<Attendee>
|
||||||
status = CalendarContract.Attendees.ATTENDEE_STATUS_ACCEPTED
|
status = CalendarContract.Attendees.ATTENDEE_STATUS_ACCEPTED
|
||||||
relationship = CalendarContract.Attendees.RELATIONSHIP_ORGANIZER
|
relationship = CalendarContract.Attendees.RELATIONSHIP_ORGANIZER
|
||||||
attendees.add(this)
|
attendees.add(this)
|
||||||
|
Loading…
Reference in New Issue
Block a user