Fix due time when rescheduling via drag and drop

pull/1061/head
Alex Baker 4 years ago
parent e5a5c9b264
commit 97264545d8

@ -213,10 +213,10 @@ open class TaskAdapter(
private suspend fun applyDate(task: Task, date: Long) { private suspend fun applyDate(task: Task, date: Long) {
val original = task.dueDate val original = task.dueDate
task.setDueDateAdjustingHideUntil(if (date == 0L) { task.setDueDateAdjustingHideUntil(when {
0L date == 0L -> 0L
} else { task.hasDueTime() -> date.toDateTime().withMillisOfDay(task.dueDate.toDateTime().millisOfDay).millis
date.toDateTime().withMillisOfDay(task.dueDate.toDateTime().millisOfDay).millis else -> Task.createDueDate(Task.URGENCY_SPECIFIC_DAY, date)
}) })
if (original != task.dueDate) { if (original != task.dueDate) {
taskDao.save(task) taskDao.save(task)

Loading…
Cancel
Save