mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 21:07:57 +01:00
Use Stable interface for Browse screens (#7544)
This commit is contained in:
@@ -20,6 +20,9 @@ import eu.kanade.tachiyomi.util.preference.plusAssign
|
||||
import eu.kanade.tachiyomi.util.system.logcat
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import logcat.LogPriority
|
||||
import rx.Observable
|
||||
import uy.kohesive.injekt.Injekt
|
||||
@@ -63,9 +66,16 @@ class ExtensionManager(
|
||||
var installedExtensions = emptyList<Extension.Installed>()
|
||||
private set(value) {
|
||||
field = value
|
||||
installedExtensionsFlow.value = field
|
||||
installedExtensionsRelay.call(value)
|
||||
}
|
||||
|
||||
private val installedExtensionsFlow = MutableStateFlow(installedExtensions)
|
||||
|
||||
fun getInstalledExtensionsFlow(): StateFlow<List<Extension.Installed>> {
|
||||
return installedExtensionsFlow.asStateFlow()
|
||||
}
|
||||
|
||||
fun getAppIconForSource(source: Source): Drawable? {
|
||||
return getAppIconForSource(source.id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user