mirror of
https://github.com/bitwarden/android.git
synced 2026-05-21 03:21:29 -05:00
Add helper property for retrieving current VM state (#257)
This commit is contained in:
@@ -29,6 +29,11 @@ abstract class BaseViewModel<S, E, A>(
|
||||
protected val eventChannel: Channel<E> = Channel(capacity = Channel.UNLIMITED)
|
||||
private val internalActionChannel: Channel<A> = Channel(capacity = Channel.UNLIMITED)
|
||||
|
||||
/**
|
||||
* A helper that returns the current state of the view model.
|
||||
*/
|
||||
protected val state: S get() = mutableStateFlow.value
|
||||
|
||||
/**
|
||||
* A [StateFlow] representing state updates.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user