commonMain.com.copperleaf.ballast.repository.bus.dsl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ballast-repository-jvm Show documentation
Show all versions of ballast-repository-jvm Show documentation
Opinionated Kotlin multiplatform Repository Caching library based on Ballast MVI
package com.copperleaf.ballast.repository.bus
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filterIsInstance
/**
* Collect Inputs of the type allowed by this ViewModel that were emitted to the EventBus.
*
* TODO: update to use Kotlin Context Receivers (https://blog.jetbrains.com/kotlin/2022/02/kotlin-1-6-20-m1-released/#prototype-of-context-receivers-for-kotlin-jvm)
* to only allow this to be called from an InputHandler
*/
public inline fun EventBus.observeInputsFromBus(): Flow = events
.filterIsInstance()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy