Fix NPE crash when duplicating tasks
This commit is contained in:
parent
b6afd0998d
commit
607c02dfa9
|
@ -659,6 +659,7 @@ fun Context.getDatesWeekDateTime(date: DateTime): String {
|
|||
}
|
||||
|
||||
fun Context.isTaskCompleted(event: Event): Boolean {
|
||||
if (event.id == null) return false
|
||||
val task = completedTasksDB.getTaskWithIdAndTs(event.id!!, event.startTS) ?: return false
|
||||
return task.flags and FLAG_TASK_COMPLETED != 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue