From d70ec00ea23aa7b7b0c2d89752dae76dba48f02c Mon Sep 17 00:00:00 2001 From: Frieder Schrempf Date: Tue, 26 Oct 2021 19:13:35 +0200 Subject: [PATCH] Fix chunking of SQLite queries in case of task deletion When having a lot of (> 999) completed tasks in a list, selecting "Remove all completed tasks" causes a crash of the app with: SQLiteLog: (1) too many SQL variables This is due to a bug that accidentally bypasses the chunking of the db queries to stay below the limit. This solves #1661. --- app/src/main/java/org/tasks/data/GoogleTaskDao.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/tasks/data/GoogleTaskDao.kt b/app/src/main/java/org/tasks/data/GoogleTaskDao.kt index 387945428..06071c327 100644 --- a/app/src/main/java/org/tasks/data/GoogleTaskDao.kt +++ b/app/src/main/java/org/tasks/data/GoogleTaskDao.kt @@ -93,7 +93,7 @@ abstract class GoogleTaskDao { abstract suspend fun getChildren(ids: List): List suspend fun hasRecurringParent(ids: List): List = - ids.chunkedMap { internalHasRecurringParent(ids) } + ids.chunkedMap { internalHasRecurringParent(it) } @Query(""" SELECT gt_task