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.
pull/1662/head
Frieder Schrempf 3 years ago
parent 5e53f8e550
commit d70ec00ea2
No known key found for this signature in database
GPG Key ID: E7DD51F45F833802

@ -93,7 +93,7 @@ abstract class GoogleTaskDao {
abstract suspend fun getChildren(ids: List<Long>): List<Long>
suspend fun hasRecurringParent(ids: List<Long>): List<Long> =
ids.chunkedMap { internalHasRecurringParent(ids) }
ids.chunkedMap { internalHasRecurringParent(it) }
@Query("""
SELECT gt_task

Loading…
Cancel
Save