workflow-kotlin icon indicating copy to clipboard operation
workflow-kotlin copied to clipboard

Make WorkflowSavedStateRegistryAggregator.attachToParentRegistryOwner more convenient.

Open rjrjr opened this issue 3 years ago • 1 comments
trafficstars

There are three copies of this fragment floating around:

    val parentRegistryOwner = stateRegistryOwnerFromViewTreeOrContext(this)
    val key = Compatible.keyFor(this.getRendering()!!)
    viewStateCache.attachToParentRegistryOwner(key, parentRegistryOwner)

Add an overload of WorkflowSavedStateRegistryAggregator.attachToParentRegistryOwner that takes a View and enshrines the convention.

Hide the existing method or leave it public? I have a hunch we may find ourselves calling it from Compose some day, if we start using its dialog() function.

rjrjr avatar Feb 22 '22 23:02 rjrjr