show a message if theres no events found for exporting
This commit is contained in:
parent
d1e6b3c28d
commit
2104b55122
|
@ -264,6 +264,11 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||
ExportEventsDialog(this, path) {
|
||||
Thread({
|
||||
val events = dbHelper.getEventsToExport(it)
|
||||
if (events.isEmpty()) {
|
||||
runOnUiThread {
|
||||
toast(R.string.no_events_for_exporting)
|
||||
}
|
||||
} else {
|
||||
val result = IcsExporter().exportEvents(this, path, events)
|
||||
runOnUiThread {
|
||||
toast(when (result) {
|
||||
|
@ -272,6 +277,7 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||
else -> R.string.exporting_events_failed
|
||||
})
|
||||
}
|
||||
}
|
||||
}).start()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue