mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-23 21:27:40 +03:00
Fix indexing notif not showing (#8758)
This commit is contained in:
parent
593172f891
commit
235bc77457
1 changed files with 14 additions and 3 deletions
|
@ -12,6 +12,8 @@ import eu.kanade.tachiyomi.source.Source
|
|||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
import eu.kanade.tachiyomi.util.lang.launchIO
|
||||
import eu.kanade.tachiyomi.util.lang.launchNonCancellable
|
||||
import eu.kanade.tachiyomi.util.system.logcat
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
|
@ -29,6 +31,7 @@ import kotlinx.coroutines.flow.receiveAsFlow
|
|||
import kotlinx.coroutines.flow.shareIn
|
||||
import kotlinx.coroutines.flow.stateIn
|
||||
import kotlinx.coroutines.withTimeout
|
||||
import logcat.LogPriority
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
@ -319,10 +322,18 @@ class DownloadCache(
|
|||
}
|
||||
}
|
||||
.awaitAll()
|
||||
|
||||
lastRenew = System.currentTimeMillis()
|
||||
notifyChanges()
|
||||
}.also {
|
||||
it.invokeOnCompletion(onCancelling = true) { exception ->
|
||||
if (exception != null && exception !is CancellationException) {
|
||||
logcat(LogPriority.ERROR, exception) { "Failed to create download cache" }
|
||||
}
|
||||
lastRenew = System.currentTimeMillis()
|
||||
notifyChanges()
|
||||
}
|
||||
}
|
||||
|
||||
// Mainly to notify the indexing notifier UI
|
||||
notifyChanges()
|
||||
}
|
||||
|
||||
private fun getSources(): List<Source> {
|
||||
|
|
Loading…
Reference in a new issue