Limit amount of updates loaded for widget
Probably fixes #9868 (cherry picked from commit 87530f506e16db3d5c9ed89740c324ebd464117f) # Conflicts: # domain/src/main/java/tachiyomi/domain/updates/interactor/GetUpdates.kt
This commit is contained in:
@@ -11,11 +11,12 @@ class UpdatesRepositoryImpl(
|
||||
private val databaseHandler: DatabaseHandler,
|
||||
) : UpdatesRepository {
|
||||
|
||||
override suspend fun awaitWithRead(read: Boolean, after: Long): List<UpdatesWithRelations> {
|
||||
override suspend fun awaitWithRead(read: Boolean, after: Long, limit: Long): List<UpdatesWithRelations> {
|
||||
return databaseHandler.awaitList {
|
||||
updatesViewQueries.getUpdatesByReadStatus(
|
||||
read = read,
|
||||
after = after,
|
||||
limit = limit,
|
||||
mapper = updateWithRelationMapper,
|
||||
)
|
||||
}
|
||||
@@ -30,11 +31,12 @@ class UpdatesRepositoryImpl(
|
||||
}
|
||||
}
|
||||
|
||||
override fun subscribeWithRead(read: Boolean, after: Long): Flow<List<UpdatesWithRelations>> {
|
||||
override fun subscribeWithRead(read: Boolean, after: Long, limit: Long): Flow<List<UpdatesWithRelations>> {
|
||||
return databaseHandler.subscribeToList {
|
||||
updatesViewQueries.getUpdatesByReadStatus(
|
||||
read = read,
|
||||
after = after,
|
||||
limit = limit,
|
||||
mapper = updateWithRelationMapper,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user