mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
db: tighten the paging observer and filter comments
This commit is contained in:
@@ -748,8 +748,8 @@ interface LibraryDao {
|
||||
@RawQuery(observedEntities = [Playlist::class])
|
||||
fun playlistsPaging(query: RoomRawQuery): PagingSource<Int, Playlist>
|
||||
|
||||
// These observe every table the statement reads, matching what Room inferred for the
|
||||
// hand-written downloaded queries, so download and library writes invalidate as before.
|
||||
// These observe every table the statements read; the sets match what Room inferred for the
|
||||
// old downloaded @Query methods, so download and library writes invalidate as before.
|
||||
@RawQuery(observedEntities = [Album::class, Song::class, SongDownload::class, AlbumSearch::class])
|
||||
fun downloadedAlbumsPaging(query: RoomRawQuery): PagingSource<Int, Album>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.subtracks.data.prefs.PlaylistSort
|
||||
import com.subtracks.data.prefs.SortNameMode
|
||||
|
||||
// The default filters intentionally omit song_downloads: the unfiltered lists do not need the
|
||||
// join, and their paging sources must not invalidate on download progress updates.
|
||||
// join, and their paging sources do not observe download writes (including progress updates).
|
||||
internal const val ALBUMS_FILTER = """
|
||||
FROM albums WHERE sourceId = :sourceId
|
||||
AND (:starredFilter = 0 OR (:starredFilter = 1 AND starred IS NOT NULL) OR (:starredFilter = 2 AND starred IS NULL))
|
||||
|
||||
Reference in New Issue
Block a user