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.
28 lines
811 B
Kotlin
28 lines
811 B
Kotlin
package org.tasks.data
|
|
|
|
import android.database.Cursor
|
|
import androidx.sqlite.db.SupportSQLiteQuery
|
|
import com.todoroo.astrid.data.Task
|
|
import kotlinx.coroutines.runBlocking
|
|
import javax.inject.Inject
|
|
|
|
@Deprecated("use coroutines")
|
|
class ContentProviderDaoBlocking @Inject constructor(private val dao: ContentProviderDao) {
|
|
fun getTagNames(taskId: Long): List<String> = runBlocking {
|
|
dao.getTagNames(taskId)
|
|
}
|
|
|
|
fun getAstrid2TaskProviderTasks(): List<Task> = runBlocking {
|
|
dao.getAstrid2TaskProviderTasks()
|
|
}
|
|
|
|
fun tagDataOrderedByName(): List<TagData> = runBlocking {
|
|
dao.tagDataOrderedByName()
|
|
}
|
|
|
|
fun getTasks(): Cursor = dao.getTasks()
|
|
|
|
fun getLists(): Cursor = dao.getLists()
|
|
|
|
fun rawQuery(query: SupportSQLiteQuery): Cursor = dao.rawQuery(query)
|
|
} |