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:
@@ -17,7 +17,7 @@ class GetUpdates(
|
||||
suspend fun await(read: Boolean, after: Long): List<UpdatesWithRelations> {
|
||||
// SY -->
|
||||
return flow {
|
||||
emit(repository.awaitWithRead(read, after))
|
||||
emit(repository.awaitWithRead(read, after, limit = 500))
|
||||
}
|
||||
.catchNPE()
|
||||
.first()
|
||||
@@ -32,7 +32,7 @@ class GetUpdates(
|
||||
}
|
||||
|
||||
fun subscribe(read: Boolean, after: Long): Flow<List<UpdatesWithRelations>> {
|
||||
return repository.subscribeWithRead(read, after)
|
||||
return repository.subscribeWithRead(read, after, limit = 500)
|
||||
// SY -->
|
||||
.catchNPE()
|
||||
// SY <--
|
||||
|
||||
@@ -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>>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user