Skip to content

Instantly share code, notes, and snippets.

@fergusonm
Last active October 21, 2021 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fergusonm/9cc38ff16840105417f69f73f3884ffd to your computer and use it in GitHub Desktop.
Save fergusonm/9cc38ff16840105417f69f73f3884ffd to your computer and use it in GitHub Desktop.
viewModel.events
.observeWithLifecycle(fragment = this, minActiveState = Lifecycle.State.RESUMED) {
// do things
}
viewModel.events
.observeWithLifecycle(lifecycleOwner = viewLifecycleOwner, minActiveState = Lifecycle.State.RESUMED) {
// do things
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment