rename NewEventTypeDialog to UpdateEventTypeDialog
This commit is contained in:
parent
d43d06bc8c
commit
7a68938f77
3 changed files with 4 additions and 4 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 {
|
Loading…
Reference in a new issue