From 4a11d057853f06528bda6648ce6831fbea355022 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 24 Feb 2022 21:34:21 +0100 Subject: [PATCH] tasks cannot be shared yet, show an error at attempt --- .../com/simplemobiletools/calendar/pro/extensions/Activity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Activity.kt index 16192b5ce..407ffaaa5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Activity.kt @@ -24,6 +24,10 @@ fun BaseSimpleActivity.shareEvents(ids: List) { } val events = eventsDB.getEventsWithIds(ids) as ArrayList + if (events.isEmpty()) { + toast(R.string.no_items_found) + } + getFileOutputStream(file.toFileDirItem(this), true) { IcsExporter().exportEvents(this, it, events, false) { if (it == IcsExporter.ExportResult.EXPORT_OK) {