fix some constants

This commit is contained in:
tibbi 2017-01-02 22:23:49 +01:00
parent c1d5032821
commit b89f8a82e8
2 changed files with 5 additions and 10 deletions

View File

@ -56,7 +56,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
updateEndDate()
updateEndTime()
setupRepetition()
setupEndCheckbox()
mWasEndDateSet = event != null
mWasEndTimeSet = event != null
@ -153,10 +152,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
)
}
private fun setupEndCheckbox() {
event_end_checkbox.setTextColor(event_start_date.currentTextColor)
}
fun endCheckboxChecked(isChecked: Boolean) {
hideKeyboard()
event_end_date.beVisibleIf(isChecked)
@ -259,8 +254,8 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
private fun getReminderMinutes(): Int {
return when (event_reminder.selectedItemPosition) {
0 -> -1
1 -> 0
0 -> REMINDER_OFF
1 -> REMINDER_AT_START
else -> {
val value = custom_reminder_value.value
val multiplier = when (custom_reminder_other_period.selectedItemPosition) {

View File

@ -14,9 +14,9 @@ val MONTHLY_VIEW = 1
val YEARLY_VIEW = 2
val EVENTS_LIST_VIEW = 3
val REMINDER_OFF = 0
val REMINDER_AT_START = 1
val REMINDER_CUSTOM = 2
val REMINDER_OFF = -1
val REMINDER_AT_START = 0
val REMINDER_CUSTOM = 1
val DAY = 86400
val WEEK = 604800