Use custom QueryPagingSource (#7321)

* Use custom QueryPagingSource

- Adds placeholder to make the list jump around less
- Fixes issue where SQLDelight QueryPagingSource would throw IndexOutOfBounds

* Review Changes
This commit is contained in:
Andreas
2022-06-18 20:55:58 +02:00
committed by GitHub
parent 4c3af7bf36
commit 3fd9e021fa
9 changed files with 301 additions and 119 deletions
@@ -19,7 +19,6 @@ class HistoryRepositoryImpl(
override fun getHistory(query: String): PagingSource<Long, HistoryWithRelations> {
return handler.subscribeToPagingSource(
countQuery = { historyViewQueries.countHistory(query) },
transacter = { historyViewQueries },
queryProvider = { limit, offset ->
historyViewQueries.history(query, limit, offset, historyWithRelationsMapper)
},