From be8b2a3fe5c8886a23e444bd1a0bf50f2a51ce6c Mon Sep 17 00:00:00 2001 From: Naveen Date: Sun, 15 Jan 2023 03:37:15 +0530 Subject: [PATCH] Rename todo to task --- .../simplemobiletools/calendar/pro/helpers/Constants.kt | 4 ++-- .../simplemobiletools/calendar/pro/helpers/IcsExporter.kt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt index d589c79c3..a81f5b7ed 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt @@ -146,8 +146,8 @@ const val CALENDAR_PRODID = "PRODID:-//Simple Mobile Tools//NONSGML Event Calend const val CALENDAR_VERSION = "VERSION:2.0" const val BEGIN_EVENT = "BEGIN:VEVENT" const val END_EVENT = "END:VEVENT" -const val BEGIN_TODO = "BEGIN:VTODO" -const val END_TODO = "END:VTODO" +const val BEGIN_TASK = "BEGIN:VTODO" +const val END_TASK = "END:VTODO" const val BEGIN_ALARM = "BEGIN:VALARM" const val END_ALARM = "END:VALARM" const val DTSTART = "DTSTART" diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsExporter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsExporter.kt index 037fddfa3..b286d7c92 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsExporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/IcsExporter.kt @@ -64,7 +64,7 @@ class IcsExporter(private val activity: BaseSimpleActivity) { out.writeLn(CALENDAR_VERSION) for (event in events) { if (event.isTask()) { - writeTodo(out, event) + writeTask(out, event) } else { writeEvent(out, event) } @@ -160,9 +160,9 @@ class IcsExporter(private val activity: BaseSimpleActivity) { } } - private fun writeTodo(writer: BufferedWriter, task: Event) { + private fun writeTask(writer: BufferedWriter, task: Event) { with(writer) { - writeLn(BEGIN_TODO) + writeLn(BEGIN_TASK) task.title.replace("\n", "\\n").let { if (it.isNotEmpty()) writeLn("$SUMMARY:$it") } task.importId.let { if (it.isNotEmpty()) writeLn("$UID$it") } writeLn("$CATEGORY_COLOR${activity.eventTypesDB.getEventTypeWithId(task.eventType)?.color}") @@ -187,7 +187,7 @@ class IcsExporter(private val activity: BaseSimpleActivity) { fillIgnoredOccurrences(task, writer) eventsExported++ - writeLn(END_TODO) + writeLn(END_TASK) } } }