Skip to content

Commit fd83111

Browse files
committed
(GetUpdates): matching a bit code with Mihon
1 parent d563e59 commit fd83111

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import eu.kanade.tachiyomi.source.Source
77
import eu.kanade.tachiyomi.source.model.Page
88
import eu.kanade.tachiyomi.util.storage.DiskUtil
99
import exh.log.xLogE
10-
import kotlinx.coroutines.DelicateCoroutinesApi
1110
import kotlinx.coroutines.flow.Flow
1211
import kotlinx.coroutines.flow.asFlow
1312
import kotlinx.coroutines.flow.drop
@@ -37,7 +36,6 @@ import uy.kohesive.injekt.api.get
3736
* and retrieved through dependency injection. You can use this class to queue new chapters or query
3837
* downloaded chapters.
3938
*/
40-
@OptIn(DelicateCoroutinesApi::class)
4139
class DownloadManager(
4240
private val context: Context,
4341
private val provider: DownloadProvider = Injekt.get(),

domain/src/main/java/tachiyomi/domain/updates/interactor/GetUpdates.kt

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package tachiyomi.domain.updates.interactor
33
import kotlinx.coroutines.delay
44
import kotlinx.coroutines.flow.Flow
55
import kotlinx.coroutines.flow.catch
6-
import kotlinx.coroutines.flow.first
7-
import kotlinx.coroutines.flow.flow
86
import kotlinx.coroutines.flow.retry
97
import logcat.LogPriority
108
import tachiyomi.core.common.util.system.logcat
@@ -18,13 +16,7 @@ class GetUpdates(
1816
) {
1917

2018
suspend fun await(read: Boolean, after: Long): List<UpdatesWithRelations> {
21-
// SY -->
22-
return flow {
23-
emit(repository.awaitWithRead(read, after, limit = 500))
24-
}
25-
.catchNPE()
26-
.first()
27-
// SY <--
19+
return repository.awaitWithRead(read, after, limit = 500)
2820
}
2921

3022
fun subscribe(instant: Instant): Flow<List<UpdatesWithRelations>> {

0 commit comments

Comments
 (0)