From 92ec9e29f6139fb51102234411f2cee931689ae4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 Mar 2019 20:27:53 +0100 Subject: [PATCH] avoid adding myself to the events twice --- .../simplemobiletools/calendar/pro/activities/EventActivity.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index 555528d0d..9922a1771 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -1344,6 +1344,7 @@ class EventActivity : SimpleActivity() { if (mEvent.id == null && isSavingEvent && attendees.isNotEmpty()) { val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId } mAvailableContacts.firstOrNull { it.email == currentCalendar?.accountName }?.apply { + attendees = attendees.filter { it.email != currentCalendar?.accountName }.toMutableList() as ArrayList status = CalendarContract.Attendees.ATTENDEE_STATUS_ACCEPTED relationship = CalendarContract.Attendees.RELATIONSHIP_ORGANIZER attendees.add(this)