Package-level declarations

Types

Link copied to clipboard

Default LifecycleViewModel implementation respecting the Lifecycle of the presenting view.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract class KalugaViewModelBottomSheetDialogFragment<ViewModel : BaseLifecycleViewModel> : BottomSheetDialogFragment

Convenience BottomSheetDialogFragment that is bound to a LifecycleViewModel

Link copied to clipboard
Link copied to clipboard

Convenience Fragment that is bound to a LifecycleViewModel

Link copied to clipboard

Holds the lifecycle of a BaseLifecycleViewModel. A single lifecycle starts at UIViewController.viewDidAppear and ends at UIViewController.viewDidDisappear of the bound UIViewController This convenience class is the result of BaseLifecycleViewModel.addLifecycleManager. Invoke unbind to unbind the Lifecycle from its bound UIViewController

Link copied to clipboard
class LifecycleSubscribableManager<ViewModel : BaseLifecycleViewModel>(viewModel: ViewModel, activity: Activity?, fragmentManager: FragmentManager, childFragmentManager: FragmentManager? = null)
Link copied to clipboard
actual open class LifecycleViewModel : ViewModel

Simple ViewModel class that is to be bound to a View lifecycle

expect open class LifecycleViewModel

Simple ViewModel class that is to be bound to a View lifecycle

actual open class LifecycleViewModel

Simple ViewModel class that is to be bound to a View lifecycle

actual open class LifecycleViewModel

Simple ViewModel class that is to be bound to a View lifecycle

actual open class LifecycleViewModel

Simple ViewModel class that is to be bound to a View lifecycle

Link copied to clipboard
open class NavigatingViewModel<A : NavigationAction<*>>(navigator: Navigator<A>, lifecycleSubscribables: LifecycleSubscribable) : BaseLifecycleViewModel

Default LifecycleViewModel allowing navigation.

Link copied to clipboard
typealias onLifeCycleChanged = () -> List<<Error class: unknown class>>

Callback invoked at the start of a lifecycle (corresponding to UIViewController.viewDidAppear of the bound ViewController. Returns a List Disposable that are cleaned automatically at the end of each lifecycle.

Link copied to clipboard

Functions

Link copied to clipboard
fun <ViewModel> ViewModel.addLifecycleManager(parent: <Error class: unknown class>, onLifecycle: onLifeCycleChanged): LifecycleManager

Adds a manager to automatically bind the LifecycleManager of a BaseLifecycleViewModel to a UIViewController. This is achieved by adding an invisible child UIViewController.

Link copied to clipboard

Binds an AppCompatActivity to the LifecycleViewModel to manage the viewmodel lifecycle.

Binds a Fragment to the LifecycleViewModel to manage the viewmodel lifecycle