Improve due date display in todo form. Fixes #1212

This commit is contained in:
Phillip Thelen 2019-08-13 17:59:45 +02:00
parent 55078c4044
commit 5db056f5b5
2 changed files with 9 additions and 2 deletions

View file

@ -149,7 +149,7 @@ android {
buildConfigField "String", "TESTING_LEVEL", "\"production\""
multiDexEnabled true
versionCode 2194
versionCode 2198
versionName "2.1"
}

View file

@ -49,6 +49,9 @@ class TaskSchedulingControls @JvmOverloads constructor(
set(value) {
field = value
configureViewsForType()
if (value == Task.TYPE_TODO) {
dueDate = null
}
}
var startDate = Date()
set(value) {
@ -61,7 +64,11 @@ class TaskSchedulingControls @JvmOverloads constructor(
var dueDate: Date? = null
set(value) {
field = value
value?.let { startDateTextView.text = dateFormatter.format(it) }
if (value != null) {
startDateTextView.text = dateFormatter.format(value)
} else {
startDateTextView.text = null
}
}
var frequency = Task.FREQUENCY_DAILY
set(value) {