diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt index d1c272d11..538d83ce1 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/base/BaseViewModel.kt @@ -29,6 +29,11 @@ abstract class BaseViewModel( protected val eventChannel: Channel = Channel(capacity = Channel.UNLIMITED) private val internalActionChannel: Channel = 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. */