Limit amount of updates loaded for widget

Probably fixes #9868
This commit is contained in:
arkon
2023-08-27 22:05:52 -04:00
parent 98d6ce2eaf
commit 87530f506e
5 changed files with 28 additions and 26 deletions

View File

@@ -10,7 +10,7 @@ class GetUpdates(
) {
suspend fun await(read: Boolean, after: Long): List<UpdatesWithRelations> {
return repository.awaitWithRead(read, after)
return repository.awaitWithRead(read, after, limit = 500)
}
fun subscribe(calendar: Calendar): Flow<List<UpdatesWithRelations>> {
@@ -18,6 +18,6 @@ class GetUpdates(
}
fun subscribe(read: Boolean, after: Long): Flow<List<UpdatesWithRelations>> {
return repository.subscribeWithRead(read, after)
return repository.subscribeWithRead(read, after, limit = 500)
}
}

View File

@@ -5,9 +5,9 @@ import tachiyomi.domain.updates.model.UpdatesWithRelations
interface UpdatesRepository {
suspend fun awaitWithRead(read: Boolean, after: Long): List<UpdatesWithRelations>
suspend fun awaitWithRead(read: Boolean, after: Long, limit: Long): List<UpdatesWithRelations>
fun subscribeAll(after: Long, limit: Long): Flow<List<UpdatesWithRelations>>
fun subscribeWithRead(read: Boolean, after: Long): Flow<List<UpdatesWithRelations>>
fun subscribeWithRead(read: Boolean, after: Long, limit: Long): Flow<List<UpdatesWithRelations>>
}