mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Omitting the export of empty LOCATION and DESCRIPTION properties in IcsExporter
This commit is contained in:
@@ -58,7 +58,7 @@ class IcsExporter {
|
|||||||
event.eventType.let { out.writeLn("$CATEGORY_COLOR${activity.eventTypesDB.getEventTypeWithId(it)?.color}") }
|
event.eventType.let { out.writeLn("$CATEGORY_COLOR${activity.eventTypesDB.getEventTypeWithId(it)?.color}") }
|
||||||
event.eventType.let { out.writeLn("$CATEGORIES${activity.eventTypesDB.getEventTypeWithId(it)?.title}") }
|
event.eventType.let { out.writeLn("$CATEGORIES${activity.eventTypesDB.getEventTypeWithId(it)?.title}") }
|
||||||
event.lastUpdated.let { out.writeLn("$LAST_MODIFIED:${Formatter.getExportedTime(it)}") }
|
event.lastUpdated.let { out.writeLn("$LAST_MODIFIED:${Formatter.getExportedTime(it)}") }
|
||||||
event.location.let { out.writeLn("$LOCATION:$it") }
|
event.location.let { if (it.isNotEmpty()) out.writeLn("$LOCATION:$it") }
|
||||||
event.availability.let { out.writeLn("$TRANSP${if (it == Events.AVAILABILITY_FREE) TRANSPARENT else OPAQUE}") }
|
event.availability.let { out.writeLn("$TRANSP${if (it == Events.AVAILABILITY_FREE) TRANSPARENT else OPAQUE}") }
|
||||||
|
|
||||||
if (event.getIsAllDay()) {
|
if (event.getIsAllDay()) {
|
||||||
@@ -138,9 +138,5 @@ class IcsExporter {
|
|||||||
isFirstLine = false
|
isFirstLine = false
|
||||||
index += MAX_LINE_LENGTH
|
index += MAX_LINE_LENGTH
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFirstLine) {
|
|
||||||
out.writeLn("$DESCRIPTION$description")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user