From d603ed3b257226f33ce7639aa269a598750c59d6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 10 Feb 2018 14:02:57 +0100 Subject: [PATCH] use more human readable default filename at exporting events --- app/build.gradle | 2 +- .../simplemobiletools/calendar/dialogs/ExportEventsDialog.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3887e7298..3e002a607 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.11.1' + implementation 'com.simplemobiletools:commons:3.11.2' implementation 'joda-time:joda-time:2.9.9' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.android.support:multidex:1.0.2' 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 4a4479572..f478833f2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt @@ -7,17 +7,17 @@ import com.simplemobiletools.calendar.R import com.simplemobiletools.calendar.activities.SimpleActivity import com.simplemobiletools.calendar.adapters.FilterEventTypeAdapter import com.simplemobiletools.calendar.extensions.dbHelper -import com.simplemobiletools.calendar.extensions.getNowSeconds import com.simplemobiletools.commons.extensions.* import kotlinx.android.synthetic.main.dialog_export_events.view.* import java.io.File +import java.util.* class ExportEventsDialog(val activity: SimpleActivity, val path: String, val callback: (exportPastEvents: Boolean, file: File, eventTypes: HashSet) -> Unit) { init { val view = (activity.layoutInflater.inflate(R.layout.dialog_export_events, null) as ViewGroup).apply { export_events_folder.text = activity.humanizePath(path) - export_events_filename.setText("events_${activity.getNowSeconds()}") + export_events_filename.setText("events_${activity.getCurrentFormattedDateTime()}") activity.dbHelper.getEventTypes { val eventTypes = HashSet()