properly handle new cases of having reminders in .ics files

This commit is contained in:
tibbi 2021-03-11 12:23:36 +01:00
parent 28f6dd185c
commit d4fc30f3e9
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ const val UID = "UID:"
const val ACTION = "ACTION:"
const val ATTENDEE = "ATTENDEE:"
const val MAILTO = "mailto:"
const val TRIGGER = "TRIGGER:"
const val TRIGGER = "TRIGGER"
const val RRULE = "RRULE:"
const val CATEGORIES = "CATEGORIES:"
const val STATUS = "STATUS:"

View file

@ -113,7 +113,7 @@ class IcsImporter(val activity: SimpleActivity) {
curReminderTriggerAction = if (action == DISPLAY) REMINDER_NOTIFICATION else REMINDER_EMAIL
}
} else if (line.startsWith(TRIGGER)) {
val value = line.substring(TRIGGER.length)
val value = line.substringAfterLast(":")
curReminderTriggerMinutes = Parser().parseDurationSeconds(value) / 60
if (!value.startsWith("-")) {
curReminderTriggerMinutes *= -1