From a4abfedf2840c927b909822b667a9dadcad56880 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 25 Feb 2021 21:54:27 +0100 Subject: [PATCH] trim some lines at importing checks --- .../simplemobiletools/calendar/pro/helpers/IcsImporter.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt index 047be8a6b..765021b96 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsImporter.kt @@ -73,7 +73,7 @@ class IcsImporter(val activity: SimpleActivity) { continue } - if (line == BEGIN_EVENT) { + if (line.trim() == BEGIN_EVENT) { resetValues() curEventTypeId = defaultEventTypeId isParsingEvent = true @@ -151,15 +151,15 @@ class IcsImporter(val activity: SimpleActivity) { curRecurrenceDayCode = Formatter.getDayCodeFromTS(timestamp) } else if (line.startsWith(SEQUENCE)) { isSequence = true - } else if (line == BEGIN_ALARM) { + } else if (line.trim() == BEGIN_ALARM) { isNotificationDescription = true - } else if (line == END_ALARM) { + } else if (line.trim() == END_ALARM) { if (isProperReminderAction && curReminderTriggerMinutes != REMINDER_OFF) { curReminderMinutes.add(curReminderTriggerMinutes) curReminderActions.add(curReminderTriggerAction) } isNotificationDescription = false - } else if (line == END_EVENT) { + } else if (line.trim() == END_EVENT) { isParsingEvent = false if (curStart != -1L && curEnd == -1L) { curEnd = curStart