mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-03-10 16:30:10 +01:00
do not show the "Exporting..." toast if theres no events to export
This commit is contained in:
parent
9c937c2a0d
commit
537afc2f05
@ -321,7 +321,6 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||||||
FilePickerDialog(this, pickFile = false) {
|
FilePickerDialog(this, pickFile = false) {
|
||||||
val path = it
|
val path = it
|
||||||
ExportEventsDialog(this, path) { exportPastEvents, file ->
|
ExportEventsDialog(this, path) { exportPastEvents, file ->
|
||||||
toast(R.string.exporting)
|
|
||||||
Thread({
|
Thread({
|
||||||
val events = dbHelper.getEventsToExport(exportPastEvents)
|
val events = dbHelper.getEventsToExport(exportPastEvents)
|
||||||
if (events.isEmpty()) {
|
if (events.isEmpty()) {
|
||||||
@ -329,6 +328,7 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||||||
toast(R.string.no_events_for_exporting)
|
toast(R.string.no_events_for_exporting)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
toast(R.string.exporting)
|
||||||
IcsExporter().exportEvents(this, file, events) {
|
IcsExporter().exportEvents(this, file, events) {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
toast(when (it) {
|
toast(when (it) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user