Skip to content

Satellite tracker and pass predictor for Android, inspired by Gpredict

Fixed too many sql error on selection update

Arty Bishop753a3c823f81
diff --git a/app/src/main/java/com/rtbishop/look4sat/repo/local/EntriesDao.kt b/app/src/main/java/com/rtbishop/look4sat/repo/local/EntriesDao.kt
index 885d3d98..57023323 100644
--- a/app/src/main/java/com/rtbishop/look4sat/repo/local/EntriesDao.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/repo/local/EntriesDao.kt
@@ -47,12 +47,12 @@ interface EntriesDao {
@Transaction
suspend fun updateEntriesSelection(satIds: List<Int>) {
clearSelection()
- updateSelection(satIds)
+ satIds.forEach { updateSelection(it) }
}
@Query("UPDATE entries SET isSelected = 0")
suspend fun clearSelection()
- @Query("UPDATE entries SET isSelected = 1 WHERE catNum IN (:satIds)")
- suspend fun updateSelection(satIds: List<Int>)
+ @Query("UPDATE entries SET isSelected = 1 WHERE catNum = :satId")
+ suspend fun updateSelection(satId: Int)
}