From 7a68938f7723915324f493d64704e336162740e1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 23 Aug 2017 10:51:56 +0200 Subject: [PATCH] rename NewEventTypeDialog to UpdateEventTypeDialog --- .../calendar/activities/ManageEventTypesActivity.kt | 4 ++-- .../calendar/dialogs/SelectEventTypeDialog.kt | 2 +- .../{NewEventTypeDialog.kt => UpdateEventTypeDialog.kt} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/{NewEventTypeDialog.kt => UpdateEventTypeDialog.kt} (95%) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/ManageEventTypesActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/ManageEventTypesActivity.kt index da858038d..05093acf9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/ManageEventTypesActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/ManageEventTypesActivity.kt @@ -5,7 +5,7 @@ import android.view.Menu import android.view.MenuItem import com.simplemobiletools.calendar.R import com.simplemobiletools.calendar.adapters.EventTypeAdapter -import com.simplemobiletools.calendar.dialogs.NewEventTypeDialog +import com.simplemobiletools.calendar.dialogs.UpdateEventTypeDialog import com.simplemobiletools.calendar.extensions.dbHelper import com.simplemobiletools.calendar.helpers.DBHelper import com.simplemobiletools.calendar.interfaces.DeleteEventTypesListener @@ -25,7 +25,7 @@ class ManageEventTypesActivity : SimpleActivity(), DeleteEventTypesListener { } private fun showEventTypeDialog(eventType: EventType? = null) { - NewEventTypeDialog(this, eventType) { + UpdateEventTypeDialog(this, eventType) { getEventTypes() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/SelectEventTypeDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/SelectEventTypeDialog.kt index 34019654f..466fe510f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/SelectEventTypeDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/SelectEventTypeDialog.kt @@ -68,7 +68,7 @@ class SelectEventTypeDialog(val activity: Activity, val currEventType: Int, val return if (typeId == NEW_TYPE_ID) { - NewEventTypeDialog(activity) { + UpdateEventTypeDialog(activity) { callback.invoke(it) activity.hideKeyboard() dialog?.dismiss() diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/NewEventTypeDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/UpdateEventTypeDialog.kt similarity index 95% rename from app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/NewEventTypeDialog.kt rename to app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/UpdateEventTypeDialog.kt index 192a54234..23ad23966 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/NewEventTypeDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/UpdateEventTypeDialog.kt @@ -15,7 +15,7 @@ import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.value import kotlinx.android.synthetic.main.dialog_event_type.view.* -class NewEventTypeDialog(val activity: Activity, var eventType: EventType? = null, val callback: (eventTypeId: Int) -> Unit) : AlertDialog.Builder(activity) { +class UpdateEventTypeDialog(val activity: Activity, var eventType: EventType? = null, val callback: (eventTypeId: Int) -> Unit) : AlertDialog.Builder(activity) { var isNewEvent = eventType == null init {