Package me.aartikov.replica.view_model

Types

Link copied to clipboard
interface Activable

Something with two states: active and inactive.

Functions

Link copied to clipboard
fun activable(): Activable

Creates an Activable.

Link copied to clipboard
fun Activable.bindToLifecycle(lifecycle: Lifecycle)

Binds Activable to onStart and onStop events of Android Lifecycle.

Link copied to clipboard
fun <T : Any, VM : ViewModel, Activable> Replica<T>.observe(viewModel: VM): ReplicaObserver<T>

Observes Replica in a scope of ViewModel. ViewModel has to be Activable.