Skip to content

Instantly share code, notes, and snippets.

@Shahgupta4sq
Last active October 23, 2017 20:51
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 Shahgupta4sq/b3c8bb9299322f5b889f73fe954e41a2 to your computer and use it in GitHub Desktop.
Save Shahgupta4sq/b3c8bb9299322f5b889f73fe954e41a2 to your computer and use it in GitHub Desktop.
viewModel.getState().observe(this, Observer { handleState(it) })
private fun handleState(state: EditProfileState?) {
if (state?.isCityDialogShown == true) {
showCitySelectionDialog()
return
}
if (state?.isGenderDialogShown == true) {
showGenderSelectionDialog()
return
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment