From a4c3023c1a93ba262a043b6d3647d1d366119e92 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 29 Jun 2020 15:03:38 -0500 Subject: [PATCH] Allow null parents from Google Tasks --- app/src/main/java/org/tasks/data/GoogleTaskDao.kt | 2 +- app/src/main/java/org/tasks/data/GoogleTaskDaoBlocking.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/tasks/data/GoogleTaskDao.kt b/app/src/main/java/org/tasks/data/GoogleTaskDao.kt index 25402c6a9..9d887cf48 100644 --- a/app/src/main/java/org/tasks/data/GoogleTaskDao.kt +++ b/app/src/main/java/org/tasks/data/GoogleTaskDao.kt @@ -131,7 +131,7 @@ abstract class GoogleTaskDao { abstract suspend fun updateParents(listId: String) @Query("UPDATE google_tasks SET gt_remote_parent = :parent, gt_remote_order = :position WHERE gt_remote_id = :id") - abstract suspend fun updatePosition(id: String, parent: String, position: String) + abstract suspend fun updatePosition(id: String, parent: String?, position: String) @Transaction open suspend fun reposition(listId: String) { diff --git a/app/src/main/java/org/tasks/data/GoogleTaskDaoBlocking.kt b/app/src/main/java/org/tasks/data/GoogleTaskDaoBlocking.kt index 1d2f5faf9..5860b0df3 100644 --- a/app/src/main/java/org/tasks/data/GoogleTaskDaoBlocking.kt +++ b/app/src/main/java/org/tasks/data/GoogleTaskDaoBlocking.kt @@ -103,7 +103,7 @@ class GoogleTaskDaoBlocking @Inject constructor(private val dao: GoogleTaskDao) dao.updateParents(listId) } - fun updatePosition(id: String, parent: String, position: String) = runBlocking { + fun updatePosition(id: String, parent: String?, position: String) = runBlocking { dao.updatePosition(id, parent, position) }