fix #892, properly handle importing reminders from .ics files

This commit is contained in:
tibbi 2019-08-28 12:01:25 +02:00
parent 9a26bc28ec
commit a83d89798f
1 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,8 @@ class IcsImporter(val activity: SimpleActivity) {
Reminder(curReminderMinutes.getOrElse(2) { REMINDER_OFF }, curReminderActions.getOrElse(2) { REMINDER_NOTIFICATION }) Reminder(curReminderMinutes.getOrElse(2) { REMINDER_OFF }, curReminderActions.getOrElse(2) { REMINDER_NOTIFICATION })
) )
reminders = reminders.sortedBy { it.minutes }.toMutableList() as ArrayList<Reminder> reminders = reminders.sortedBy { it.minutes }.sortedBy { it.minutes == REMINDER_OFF }.toMutableList() as ArrayList<Reminder>
val eventType = eventTypes.firstOrNull { it.id == curEventTypeId } val eventType = eventTypes.firstOrNull { it.id == curEventTypeId }
val source = if (calDAVCalendarId == 0 || eventType?.isSyncedEventType() == false) SOURCE_IMPORTED_ICS else "$CALDAV-$calDAVCalendarId" val source = if (calDAVCalendarId == 0 || eventType?.isSyncedEventType() == false) SOURCE_IMPORTED_ICS else "$CALDAV-$calDAVCalendarId"
val event = Event(null, curStart, curEnd, curTitle, curLocation, curDescription, reminders[0].minutes, val event = Event(null, curStart, curEnd, curTitle, curLocation, curDescription, reminders[0].minutes,