rename UpdateEventTypeDialog to EditEventTypeDialog

This commit is contained in:
tibbi 2018-10-24 15:26:10 +02:00
parent 7501844d72
commit 536e3b79e6
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import android.view.Menu
import android.view.MenuItem
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.adapters.ManageEventTypesAdapter
import com.simplemobiletools.calendar.dialogs.UpdateEventTypeDialog
import com.simplemobiletools.calendar.dialogs.EditEventTypeDialog
import com.simplemobiletools.calendar.extensions.dbHelper
import com.simplemobiletools.calendar.interfaces.DeleteEventTypesListener
import com.simplemobiletools.calendar.models.EventType
@ -24,7 +24,7 @@ class ManageEventTypesActivity : SimpleActivity(), DeleteEventTypesListener {
}
private fun showEventTypeDialog(eventType: EventType? = null) {
UpdateEventTypeDialog(this, eventType?.copy()) {
EditEventTypeDialog(this, eventType?.copy()) {
getEventTypes()
}
}

View File

@ -1,8 +1,8 @@
package com.simplemobiletools.calendar.dialogs
import android.app.Activity
import androidx.appcompat.app.AlertDialog
import android.widget.ImageView
import androidx.appcompat.app.AlertDialog
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.extensions.config
import com.simplemobiletools.calendar.extensions.dbHelper
@ -11,7 +11,7 @@ import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.*
import kotlinx.android.synthetic.main.dialog_event_type.view.*
class UpdateEventTypeDialog(val activity: Activity, var eventType: EventType? = null, val callback: (eventType: EventType) -> Unit) {
class EditEventTypeDialog(val activity: Activity, var eventType: EventType? = null, val callback: (eventType: EventType) -> Unit) {
var isNewEvent = eventType == null
init {

View File

@ -72,7 +72,7 @@ class SelectEventTypeDialog(val activity: Activity, val currEventType: Int, val
}
if (eventType.id == NEW_TYPE_ID) {
UpdateEventTypeDialog(activity) {
EditEventTypeDialog(activity) {
callback(it)
activity.hideKeyboard()
dialog?.dismiss()