Skip to content

Instantly share code, notes, and snippets.

@carotkut94
Created October 21, 2021 10:19
Show Gist options
  • Save carotkut94/787f0b635fdb654c8506f1a038be8ff2 to your computer and use it in GitHub Desktop.
Save carotkut94/787f0b635fdb654c8506f1a038be8ff2 to your computer and use it in GitHub Desktop.
private fun resolveParentCompositionContext() = parentContext
?: findViewTreeCompositionContext()?.also { cachedViewTreeCompositionContext = it }
?: cachedViewTreeCompositionContext
?: windowRecomposer.also { cachedViewTreeCompositionContext = it }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment