(GetUpdates): matching a bit code with Mihon

This commit is contained in:
Cuong-Tran 2025-03-08 18:14:29 +07:00
parent d563e5996b
commit fd83111c5e
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
2 changed files with 1 additions and 11 deletions

View file

@ -7,7 +7,6 @@ import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.util.storage.DiskUtil
import exh.log.xLogE
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.drop
@ -37,7 +36,6 @@ import uy.kohesive.injekt.api.get
* and retrieved through dependency injection. You can use this class to queue new chapters or query
* downloaded chapters.
*/
@OptIn(DelicateCoroutinesApi::class)
class DownloadManager(
private val context: Context,
private val provider: DownloadProvider = Injekt.get(),

View file

@ -3,8 +3,6 @@ package tachiyomi.domain.updates.interactor
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.retry
import logcat.LogPriority
import tachiyomi.core.common.util.system.logcat
@ -18,13 +16,7 @@ class GetUpdates(
) {
suspend fun await(read: Boolean, after: Long): List<UpdatesWithRelations> {
// SY -->
return flow {
emit(repository.awaitWithRead(read, after, limit = 500))
}
.catchNPE()
.first()
// SY <--
return repository.awaitWithRead(read, after, limit = 500)
}
fun subscribe(instant: Instant): Flow<List<UpdatesWithRelations>> {