commonMain.moe.tlaster.precompose.navigation.UiClosable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of precompose-jvm Show documentation
Show all versions of precompose-jvm Show documentation
A third-party Jetbrains Compose library with ViewModel, LiveData and Navigation support.
package moe.tlaster.precompose.navigation
import androidx.compose.runtime.saveable.SaveableStateHolder
interface UiClosable {
fun close(stateId: String)
}
internal class ComposeUiClosable(
val composeSaveableStateHolder: SaveableStateHolder,
) : UiClosable {
override fun close(stateId: String) {
composeSaveableStateHolder.removeState(stateId)
}
}