mirror of https://github.com/tasks/tasks
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
534 B
Kotlin
16 lines
534 B
Kotlin
package com.todoroo.astrid.adapter
|
|
|
|
import com.todoroo.astrid.dao.TaskDao
|
|
import org.tasks.data.CaldavDao
|
|
|
|
class CaldavTaskAdapter internal constructor(taskDao: TaskDao, caldavDao: CaldavDao) : CaldavManualSortTaskAdapter(taskDao, caldavDao) {
|
|
override fun supportsManualSorting() = false
|
|
|
|
override fun moved(from: Int, to: Int, indent: Int) {
|
|
val task = getTask(from)
|
|
val newParent = findNewParent(indent, to)
|
|
if (newParent != task.parent) {
|
|
changeParent(task, newParent)
|
|
}
|
|
}
|
|
} |