Skip to content

Instantly share code, notes, and snippets.

@NikolaDespotoski
Last active March 30, 2020 22:16
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 NikolaDespotoski/cd5cc3b0b2e480dab0f9711c3120f2c6 to your computer and use it in GitHub Desktop.
Save NikolaDespotoski/cd5cc3b0b2e480dab0f9711c3120f2c6 to your computer and use it in GitHub Desktop.
class ProductsViewModel @Inject constructor(
 private val activityResultContractor: ActivityResultContractor<Nothing, String>,
  private val coroutineProvider: CoroutineProvider,
 private val productInteractor: ProductInteractor
) : ViewModel(), ActivityResultCallback<String>,
 ActivityResultContractor<Unit, String> by activityResultContractor{
override fun onActivityResult(result: String?) {
 // do something with the result
 }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment