mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Switch from Kodein to Koin (#1112)
* Switch from Kodein to Koin * Ktlint
This commit is contained in:
@@ -9,14 +9,12 @@ package suwayomi.tachidesk.graphql.subscriptions
|
||||
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
import org.kodein.di.DI
|
||||
import org.kodein.di.conf.global
|
||||
import org.kodein.di.instance
|
||||
import suwayomi.tachidesk.graphql.types.UpdateStatus
|
||||
import suwayomi.tachidesk.manga.impl.update.IUpdater
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class UpdateSubscription {
|
||||
private val updater by DI.global.instance<IUpdater>()
|
||||
private val updater: IUpdater by injectLazy()
|
||||
|
||||
fun updateStatusChanged(): Flow<UpdateStatus> =
|
||||
updater.status.map { updateStatus ->
|
||||
|
||||
Reference in New Issue
Block a user