mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Rename todo to task
This commit is contained in:
@@ -146,8 +146,8 @@ const val CALENDAR_PRODID = "PRODID:-//Simple Mobile Tools//NONSGML Event Calend
|
|||||||
const val CALENDAR_VERSION = "VERSION:2.0"
|
const val CALENDAR_VERSION = "VERSION:2.0"
|
||||||
const val BEGIN_EVENT = "BEGIN:VEVENT"
|
const val BEGIN_EVENT = "BEGIN:VEVENT"
|
||||||
const val END_EVENT = "END:VEVENT"
|
const val END_EVENT = "END:VEVENT"
|
||||||
const val BEGIN_TODO = "BEGIN:VTODO"
|
const val BEGIN_TASK = "BEGIN:VTODO"
|
||||||
const val END_TODO = "END:VTODO"
|
const val END_TASK = "END:VTODO"
|
||||||
const val BEGIN_ALARM = "BEGIN:VALARM"
|
const val BEGIN_ALARM = "BEGIN:VALARM"
|
||||||
const val END_ALARM = "END:VALARM"
|
const val END_ALARM = "END:VALARM"
|
||||||
const val DTSTART = "DTSTART"
|
const val DTSTART = "DTSTART"
|
||||||
|
@@ -64,7 +64,7 @@ class IcsExporter(private val activity: BaseSimpleActivity) {
|
|||||||
out.writeLn(CALENDAR_VERSION)
|
out.writeLn(CALENDAR_VERSION)
|
||||||
for (event in events) {
|
for (event in events) {
|
||||||
if (event.isTask()) {
|
if (event.isTask()) {
|
||||||
writeTodo(out, event)
|
writeTask(out, event)
|
||||||
} else {
|
} else {
|
||||||
writeEvent(out, event)
|
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) {
|
with(writer) {
|
||||||
writeLn(BEGIN_TODO)
|
writeLn(BEGIN_TASK)
|
||||||
task.title.replace("\n", "\\n").let { if (it.isNotEmpty()) writeLn("$SUMMARY:$it") }
|
task.title.replace("\n", "\\n").let { if (it.isNotEmpty()) writeLn("$SUMMARY:$it") }
|
||||||
task.importId.let { if (it.isNotEmpty()) writeLn("$UID$it") }
|
task.importId.let { if (it.isNotEmpty()) writeLn("$UID$it") }
|
||||||
writeLn("$CATEGORY_COLOR${activity.eventTypesDB.getEventTypeWithId(task.eventType)?.color}")
|
writeLn("$CATEGORY_COLOR${activity.eventTypesDB.getEventTypeWithId(task.eventType)?.color}")
|
||||||
@@ -187,7 +187,7 @@ class IcsExporter(private val activity: BaseSimpleActivity) {
|
|||||||
fillIgnoredOccurrences(task, writer)
|
fillIgnoredOccurrences(task, writer)
|
||||||
|
|
||||||
eventsExported++
|
eventsExported++
|
||||||
writeLn(END_TODO)
|
writeLn(END_TASK)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user