Use transaction for queued downloads query

This commit is contained in:
Niels van Velzen authored and Niels van Velzen committed 2026-06-20 17:02:10 +02:00
1 parent 6be3652bdc
commit 0f3230ffe8
1 file changed
+1
@@ -21,6 +21,7 @@ interface DownloadDao {
@Query("SELECT * FROM download ORDER BY created_at DESC")
fun getAllDownloadsWithFiles(): Flow<List<DownloadFiles>>
@Transaction
@Query("SELECT * FROM download WHERE status = 'QUEUED' OR status = 'DOWNLOADING' ORDER BY created_at ASC")
fun getQueuedDownloads(): List<DownloadFiles>