rename RepeatRuleDailyDialog to RepeatRuleWeeklyDialog

This commit is contained in:
tibbi 2017-05-07 18:21:55 +02:00
parent 480bd27c12
commit d8b32fa066
2 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,7 @@ import android.view.MenuItem
import android.view.WindowManager
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.dialogs.DeleteEventDialog
import com.simplemobiletools.calendar.dialogs.RepeatRuleDailyDialog
import com.simplemobiletools.calendar.dialogs.RepeatRuleWeeklyDialog
import com.simplemobiletools.calendar.dialogs.RepeatTypePickerDialog
import com.simplemobiletools.calendar.dialogs.SelectEventTypeDialog
import com.simplemobiletools.calendar.extensions.*
@ -208,8 +208,10 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
private fun showRepetitionRuleDialog() {
hideKeyboard()
RepeatRuleDailyDialog(this, mRepeatRule) {
setRepeatRule(it)
if (isXWeeklyRepetition()) {
RepeatRuleWeeklyDialog(this, mRepeatRule) {
setRepeatRule(it)
}
}
}

View File

@ -9,7 +9,7 @@ import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.views.MyAppCompatCheckbox
import kotlinx.android.synthetic.main.dialog_vertical_linear_layout.view.*
class RepeatRuleDailyDialog(val activity: Activity, val curRepeatRule: Int, val callback: (repeatRule: Int) -> Unit) :
class RepeatRuleWeeklyDialog(val activity: Activity, val curRepeatRule: Int, val callback: (repeatRule: Int) -> Unit) :
AlertDialog.Builder(activity) {
val dialog: AlertDialog
val view: View = activity.layoutInflater.inflate(R.layout.dialog_vertical_linear_layout, null)