autoformatting the file

This commit is contained in:
Tibor Kaputa
2021-08-12 22:02:41 +02:00
committed by GitHub
parent 3a0ee3794c
commit 5c94f82bbb

View File

@@ -23,7 +23,13 @@ class IcsExporter {
private var eventsFailed = 0 private var eventsFailed = 0
private var calendars = ArrayList<CalDAVCalendar>() private var calendars = ArrayList<CalDAVCalendar>()
fun exportEvents(activity: BaseSimpleActivity, outputStream: OutputStream?, events: ArrayList<Event>, showExportingToast: Boolean, callback: (result: ExportResult) -> Unit) { fun exportEvents(
activity: BaseSimpleActivity,
outputStream: OutputStream?,
events: ArrayList<Event>,
showExportingToast: Boolean,
callback: (result: ExportResult) -> Unit
) {
if (outputStream == null) { if (outputStream == null) {
callback(EXPORT_FAIL) callback(EXPORT_FAIL)
return return
@@ -74,11 +80,13 @@ class IcsExporter {
out.writeLn(END_CALENDAR) out.writeLn(END_CALENDAR)
} }
callback(when { callback(
when {
eventsExported == 0 -> EXPORT_FAIL eventsExported == 0 -> EXPORT_FAIL
eventsFailed > 0 -> EXPORT_PARTIAL eventsFailed > 0 -> EXPORT_PARTIAL
else -> EXPORT_OK else -> EXPORT_OK
}) }
)
} }
} }