diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt index 8e8908eaa..87e9e22d6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -260,7 +260,8 @@ class MainActivity : SimpleActivity(), NavigationListener { private fun exportEvents() { FilePickerDialog(this, pickFile = false) { - ExportEventsDialog(this, it) { + val path = it + ExportEventsDialog(this, path) { } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt index 4ed812429..245dd8442 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt @@ -8,20 +8,17 @@ import com.simplemobiletools.commons.extensions.humanizePath import com.simplemobiletools.commons.extensions.setupDialogStuff import kotlinx.android.synthetic.main.dialog_export_events.view.* -class ExportEventsDialog(val activity: Activity, val path: String, val callback: (refreshView: Boolean) -> Unit) : AlertDialog.Builder(activity) { +class ExportEventsDialog(val activity: Activity, val path: String, val callback: (exportPastEvents: Boolean) -> Unit) : AlertDialog.Builder(activity) { init { val view = (activity.layoutInflater.inflate(R.layout.dialog_export_events, null) as ViewGroup).apply { export_events_folder.text = activity.humanizePath(path) } AlertDialog.Builder(activity) - .setPositiveButton(R.string.ok, null) + .setPositiveButton(R.string.ok, { dialog, which -> callback(view.export_events_checkbox.isChecked) }) .setNegativeButton(R.string.cancel, null) .create().apply { activity.setupDialogStuff(view, this, R.string.export_events) - getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({ - - }) } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/YearlyCalendarImpl.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/YearlyCalendarImpl.kt index de12fde3c..4d09d12fb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/YearlyCalendarImpl.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/YearlyCalendarImpl.kt @@ -21,7 +21,7 @@ class YearlyCalendarImpl(val callback: YearlyCalendar, val context: Context, val } } - fun gotEvents(events: MutableList) { + private fun gotEvents(events: MutableList) { val filtered = context.getFilteredEvents(events) val arr = SparseArray>(12) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 12a831377..fb310c91c 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -105,7 +105,7 @@ Exportiere raw Datenbank Standard-Termin-Typ Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 48738c691..2d987479b 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index dfb3bc40f..c6cd8bd65 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -105,7 +105,7 @@ Exporter la base de données brute Type d\'evénement par défaut Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 468b09624..bf4dabecb 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index e1951a67d..6d654a7a5 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f080b3636..d0d335ff3 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index f3749dbb3..281c19b29 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index ab8dc2846..2c74b2198 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 8f647a296..29326429b 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -105,7 +105,7 @@ Exportar base de dados raw Tipo de evento padrão Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 41af740d7..966f914ed 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -105,7 +105,7 @@ Exportar base de dados raw Tipo de evento padrão Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index f7173b8ff..8dbe5fe65 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -105,7 +105,7 @@ Экспортировать необработанную базу Тип события по умолчанию Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index d1cdb05cc..761fcdf9a 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f845fde97..b062c61d2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -105,7 +105,7 @@ Export raw database Default event type Events have been exported successfully - Export events to .ics file + Export events to an .ics file No events for exporting have been found Export past events too