Skip to content

Commit 8c17fb5

Browse files
committed
Some method renaming and other polish from PR review.
- `ScreenViewFactory.unwrapping` > `.toUnwrappingViewFactory`, and deleted redundant kdoc - `ScreenViewFactory.start` > `.startShowing` - Inlined `Screen.buildView`
1 parent cf7c2ed commit 8c17fb5

File tree

19 files changed

+107
-149
lines changed

19 files changed

+107
-149
lines changed

workflow-ui/compose/src/main/java/com/squareup/workflow1/ui/compose/WorkflowRendering.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
3131
import com.squareup.workflow1.ui.WorkflowViewStub
3232
import com.squareup.workflow1.ui.androidx.WorkflowLifecycleOwner
3333
import com.squareup.workflow1.ui.show
34-
import com.squareup.workflow1.ui.start
34+
import com.squareup.workflow1.ui.startShowing
3535
import com.squareup.workflow1.ui.toViewFactory
3636
import kotlin.reflect.KClass
3737

@@ -185,7 +185,7 @@ private fun <ScreenT : Screen> ScreenViewFactory<ScreenT>.asComposeViewFactory()
185185
// We pass in a null container because the container isn't a View, it's a composable. The
186186
// compose machinery will generate an intermediate view that it ends up adding this to but
187187
// we don't have access to that.
188-
originalFactory.start(rendering, viewEnvironment, context, container = null)
188+
originalFactory.startShowing(rendering, viewEnvironment, context, container = null)
189189
.let { viewHolder ->
190190
// Put the viewHolder in a tag so that we can find it in the update lambda, below.
191191
viewHolder.view.setTag(R.id.workflow_screen_view_holder, viewHolder)

workflow-ui/container-android/src/main/java/com/squareup/workflow1/ui/modal/ModalViewContainer.kt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ import com.squareup.workflow1.ui.ViewRegistry
2020
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
2121
import com.squareup.workflow1.ui.asScreen
2222
import com.squareup.workflow1.ui.bindShowRendering
23-
import com.squareup.workflow1.ui.buildView
2423
import com.squareup.workflow1.ui.container.BackButtonScreen
2524
import com.squareup.workflow1.ui.modal.ModalViewContainer.Companion.binding
2625
import com.squareup.workflow1.ui.onBackPressedDispatcherOwnerOrNull
2726
import com.squareup.workflow1.ui.show
27+
import com.squareup.workflow1.ui.startShowing
28+
import com.squareup.workflow1.ui.toViewFactory
2829
import kotlin.reflect.KClass
2930

3031
/**
@@ -72,11 +73,13 @@ public open class ModalViewContainer @JvmOverloads constructor(
7273
// that should be blocked by this modal session.
7374
val wrappedRendering = BackButtonScreen(asScreen(initialModalRendering)) { }
7475

75-
val viewHolder = wrappedRendering.buildView(
76-
initialViewEnvironment = initialViewEnvironment,
77-
contextForNewView = this.context,
78-
container = this
79-
)
76+
val viewHolder = wrappedRendering.toViewFactory(initialViewEnvironment)
77+
.startShowing(
78+
initialRendering = wrappedRendering,
79+
initialEnvironment = initialViewEnvironment,
80+
contextForNewView = this.context,
81+
container = this
82+
)
8083

8184
return buildDialogForView(viewHolder.view)
8285
.apply {

workflow-ui/core-android/api/core-android.api

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,11 @@ public final class com/squareup/workflow1/ui/ScreenViewFactoryFinder$DefaultImpl
187187
}
188188

189189
public final class com/squareup/workflow1/ui/ScreenViewFactoryKt {
190-
public static final fun buildView (Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/squareup/workflow1/ui/ViewStarter;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
191-
public static synthetic fun buildView$default (Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/squareup/workflow1/ui/ViewStarter;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
192-
public static final fun start (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/squareup/workflow1/ui/ViewStarter;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
193-
public static synthetic fun start$default (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/squareup/workflow1/ui/ViewStarter;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
190+
public static final fun startShowing (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/squareup/workflow1/ui/ViewStarter;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
191+
public static synthetic fun startShowing$default (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/squareup/workflow1/ui/ViewStarter;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
192+
public static final synthetic fun toUnwrappingViewFactory (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/ScreenViewFactory;
193+
public static final synthetic fun toUnwrappingViewFactory (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function4;)Lcom/squareup/workflow1/ui/ScreenViewFactory;
194194
public static final fun toViewFactory (Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;)Lcom/squareup/workflow1/ui/ScreenViewFactory;
195-
public static final synthetic fun unwrapping (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/ScreenViewFactory;
196-
public static final synthetic fun unwrapping (Lcom/squareup/workflow1/ui/ScreenViewFactory;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function4;)Lcom/squareup/workflow1/ui/ScreenViewFactory;
197195
public static final fun viewBindingLayoutInflater (Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/LayoutInflater;
198196
}
199197

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/AndroidViewRegistry.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public fun <RenderingT : Any> ViewRegistry.getFactoryFor(
3838
return getEntryFor(renderingType) as? ViewFactory<RenderingT>
3939
}
4040

41-
@Deprecated("Use Screen.toView")
41+
@Deprecated("Use ScreenViewFactory.startShowing")
4242
@WorkflowUiExperimentalApi
4343
public fun <RenderingT : Any> ViewRegistry.buildView(
4444
initialRendering: RenderingT,

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/DecorativeViewFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import android.view.ViewGroup
66
import kotlin.reflect.KClass
77

88
@Suppress("DEPRECATION")
9-
@Deprecated("Use ScreenViewFactory.unwrapping.")
9+
@Deprecated("Use ScreenViewFactory.unwrapping")
1010
@WorkflowUiExperimentalApi
1111
public class DecorativeViewFactory<OuterT : Any, InnerT : Any>(
1212
override val type: KClass<OuterT>,

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/NamedScreenViewFactory.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import com.squareup.workflow1.ui.ScreenViewFactory.Companion.forBuiltView
77
* to the factory for [NamedScreen.wrapped].
88
*/
99
@WorkflowUiExperimentalApi
10-
internal
11-
fun <WrappedT : Screen> NamedScreenViewFactory() =
10+
internal fun <WrappedT : Screen> NamedScreenViewFactory() =
1211
forBuiltView<NamedScreen<WrappedT>> { namedScreen, environment, context, container ->
1312
namedScreen.wrapped.toViewFactory(environment)
14-
.unwrapping<NamedScreen<WrappedT>, WrappedT> { it.wrapped }
13+
.toUnwrappingViewFactory<NamedScreen<WrappedT>, WrappedT> { it.wrapped }
1514
.buildView(namedScreen, environment, context, container)
1615
}

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/ScreenViewFactory.kt

Lines changed: 29 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ public typealias ViewBindingInflater<BindingT> = (LayoutInflater, ViewGroup?, Bo
1919
* Each [ScreenViewRunner] instance is paired with the single [View] instance,
2020
* its neighbor in a [ScreenViewHolder].
2121
*
22-
* Use [forLayoutResource], [forViewBinding], etc., to create a [ScreenViewFactory]
23-
* from a [ScreenViewRunner].
22+
* Use [forLayoutResource], [forViewBinding], etc., to create a [ScreenViewFactory].
23+
* These helper methods take a layout resource, view binding, or view building
24+
* function as arguments, along with a factory to create a [showRendering]
25+
* [ScreenViewRunner.showRendering] function.
2426
*/
2527
@WorkflowUiExperimentalApi
2628
public fun interface ScreenViewRunner<in ScreenT : Screen> {
@@ -43,9 +45,9 @@ public fun interface ScreenViewRunner<in ScreenT : Screen> {
4345
* for you.
4446
*
4547
* If you are building a custom container and [WorkflowViewStub] is too restrictive,
46-
* use [Screen.buildView], or [ScreenViewFactory.start]. [start] is the fundamental
47-
* method, responsible for making the initial call to [ScreenViewHolder.show], and
48-
* applying any [ViewStarter] provided for custom initialization.
48+
* use [Screen.startShowing], or [ScreenViewFactory.startShowing]. [startShowing]
49+
* is the fundamental method, responsible for making the initial call to [ScreenViewHolder.show],
50+
* and applying any [ViewStarter] provided for custom initialization.
4951
*/
5052
@WorkflowUiExperimentalApi
5153
public interface ScreenViewFactory<in ScreenT : Screen> : ViewRegistry.Entry<ScreenT> {
@@ -163,9 +165,9 @@ public interface ScreenViewFactory<in ScreenT : Screen> : ViewRegistry.Entry<Scr
163165
* bound to the type of the receiving [Screen].
164166
*
165167
* - It is more common to use [WorkflowViewStub.show] than to call this method directly
166-
* - Call [ScreenViewFactory.start] to create and initialize a new [View]
168+
* - Call [ScreenViewFactory.startShowing] to create and initialize a new [View]
167169
* - If you don't particularly need to mess with the [ScreenViewFactory] before creating
168-
* a view, use [Screen.buildView] instead of this method.
170+
* a view, use [Screen.startShowing] instead of this method.
169171
*/
170172
@WorkflowUiExperimentalApi
171173
public fun <ScreenT : Screen> ScreenT.toViewFactory(
@@ -177,16 +179,15 @@ public fun <ScreenT : Screen> ScreenT.toViewFactory(
177179
/**
178180
* It is more common to use [WorkflowViewStub.show] than to call this method directly.
179181
*
180-
* Creates a [ScreenViewHolder] wrapping a [View] able to display [initialRendering],
181-
* and initializes the view.
182+
* Creates a [ScreenViewHolder] wrapping a [View] able to display a stream
183+
* of [ScreenT] renderings, starting with [initialRendering].
182184
*
183-
* By default "initialize" makes the first call to [ScreenViewHolder.show].
184185
* To add more initialization behavior (typically a call to [WorkflowLifecycleOwner.installOn]),
185186
* provide a [viewStarter].
186187
*/
187188
@Suppress("DEPRECATION")
188189
@WorkflowUiExperimentalApi
189-
public fun <ScreenT : Screen> ScreenViewFactory<ScreenT>.start(
190+
public fun <ScreenT : Screen> ScreenViewFactory<ScreenT>.startShowing(
190191
initialRendering: ScreenT,
191192
initialEnvironment: ViewEnvironment,
192193
contextForNewView: Context,
@@ -240,40 +241,17 @@ public fun <ScreenT : Screen> ScreenViewFactory<ScreenT>.start(
240241
shown = true
241242
}
242243
check(shown) {
243-
"A ViewStarter provided to Screen.toView or ScreenViewFactory.start " +
244+
"A ViewStarter provided to ScreenViewFactory.startShowing " +
244245
"neglected to call the given doStart() function"
245246
}
246247
}
247248
}
248249
}
249250

250251
/**
251-
* It is more common to use [WorkflowViewStub.show] than to call this method directly.
252-
*
253-
* Creates a [View] able to display [initialRendering], and initializes it. By
254-
* default "initialize" makes the first call to [ScreenViewHolder.show].
255-
* To add more initialization behavior (typically a call to [WorkflowLifecycleOwner.installOn]),
256-
* provide a [viewStarter].
257-
*
258-
* This method is purely shorthand for calling [Screen.toViewFactory] and then
259-
* [ScreenViewFactory.start]. You might wish to make those calls separately if you
260-
* need to treat the [ScreenViewFactory] before using it, e.g. via [unwrapping].
261-
*/
262-
@WorkflowUiExperimentalApi
263-
public fun <ScreenT : Screen> ScreenT.buildView(
264-
initialViewEnvironment: ViewEnvironment,
265-
contextForNewView: Context,
266-
container: ViewGroup? = null,
267-
viewStarter: ViewStarter? = null
268-
): ScreenViewHolder<ScreenT> {
269-
return toViewFactory(initialViewEnvironment)
270-
.start(this, initialViewEnvironment, contextForNewView, container, viewStarter)
271-
}
272-
273-
/**
274-
* A wrapper for the function invoked when [ScreenViewFactory.start] or
275-
* [Screen.buildView] is called, allowing for custom initialization of
276-
* a newly built [View] before or after the first call to [ScreenViewHolder.show].
252+
* A wrapper for the function invoked when [ScreenViewFactory.startShowing] is called,
253+
* allowing for custom initialization of a newly built [View] before or after the first
254+
* call to [ScreenViewHolder.show].
277255
*/
278256
@WorkflowUiExperimentalApi
279257
public fun interface ViewStarter {
@@ -364,10 +342,13 @@ public fun interface ViewStarter {
364342
* @param unwrap a function to extract [WrappedT] instances from [WrapperT]s.
365343
*/
366344
@WorkflowUiExperimentalApi
367-
public inline
368-
fun <reified WrapperT : Screen, WrappedT : Screen> ScreenViewFactory<WrappedT>.unwrapping(
345+
public inline fun <
346+
reified WrapperT : Screen,
347+
WrappedT : Screen
348+
> ScreenViewFactory<WrappedT>.toUnwrappingViewFactory(
369349
crossinline unwrap: (wrapperScreen: WrapperT) -> WrappedT,
370-
): ScreenViewFactory<WrapperT> = unwrapping(unwrap) { _, ws, e, su -> su(unwrap(ws), e) }
350+
): ScreenViewFactory<WrapperT> =
351+
toUnwrappingViewFactory(unwrap) { _, ws, e, su -> su(unwrap(ws), e) }
371352

372353
/**
373354
* Transforms a [ScreenViewFactory] of [WrappedT] into one that can handle
@@ -390,61 +371,30 @@ fun <reified WrapperT : Screen, WrappedT : Screen> ScreenViewFactory<WrappedT>.u
390371
* fun <W: Screen> WithTutorialTipsFactory<W>() =
391372
* ScreenViewFactory.forBuiltView<WithTutorialTips<*>> = {
392373
* initialRendering, initialEnv, context, container ->
374+
* // Get the view factory of the wrapped screen.
393375
* initialRendering.wrapped.toViewFactory(initialEnv)
376+
* // Transform it to factory that accepts WithTutorialTips<W>
394377
* .unwrapping<WithTutorialTips<W>, W>(
395378
* unwrap = { it.wrapped },
396379
* showWrapperScreen = { view, withTips, env, showUnwrapped ->
397380
* TutorialTipRunner.run(view)
398381
* showUnwrapped(withTips.wrapped, env)
399382
* }
383+
* // Delegate to the transformed factory to build the view.
400384
* .buildView(initialRendering, initialEnv, context, container)
401385
* }
402386
*
403-
* To make a wrapper that adds pre- or post-processing to [View] updates:
404-
*
405-
* class BackButtonScreen<W : Screen>(
406-
* val wrapped: W,
407-
* val override: Boolean = false,
408-
* val onBackPressed: (() -> Unit)? = null
409-
* ) : Screen, Compatible {
410-
* override val compatibilityKey = Compatible.keyFor(wrapped)
411-
* }
412-
*
413-
* fun <W: Screen> BackButtonViewFactory<W>() =
414-
* ScreenViewFactory.forBuiltView<BackButtonScreen<W>> {
415-
* initialRendering, initialEnv, context, container ->
416-
* initialRendering.wrapped.toViewFactory(initialEnv)
417-
* .unwrapping<BackButtonScreen<W>, W>(
418-
* unwrap = { it.wrapped },
419-
* showWrapperScreen = { view, backButtonScreen, env, showUnwrapped ->
420-
* if (!backButtonScreen.shadow) {
421-
* // Place our handler before invoking innerShowRendering, so that
422-
* // its later calls to view.backPressedHandler will take precedence
423-
* // over ours.
424-
* view.backPressedHandler = backButtonScreen.onBackPressed
425-
* }
426-
*
427-
* // Show the wrapped Screen.
428-
* showUnwrapped(backButtonScreen.wrapped, env)
429-
*
430-
* if (backButtonScreen.shadow) {
431-
* // Place our handler after invoking innerShowRendering, so that ours wins.
432-
* view.backPressedHandler = backButtonScreen.onBackPressed
433-
* }
434-
* }
435-
* )
436-
* .buildView(initialRendering, initialEnv, context, container)
437-
* }
438-
*
439387
* @param unwrap a function to extract [WrappedT] instances from [WrapperT]s.
440388
*
441389
* @param showWrapperScreen a function invoked when an instance of [WrapperT] needs
442390
* to be shown in a [View] built to display instances of [WrappedT]. Allows
443391
* pre- and post-processing of the [View].
444392
*/
445393
@WorkflowUiExperimentalApi
446-
public inline
447-
fun <reified WrapperT : Screen, WrappedT : Screen> ScreenViewFactory<WrappedT>.unwrapping(
394+
public inline fun <
395+
reified WrapperT : Screen,
396+
WrappedT : Screen
397+
> ScreenViewFactory<WrappedT>.toUnwrappingViewFactory(
448398
crossinline unwrap: (wrapperScreen: WrapperT) -> WrappedT,
449399
crossinline showWrapperScreen: (
450400
view: View,

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/ScreenViewHolder.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import com.squareup.workflow1.ui.ScreenViewHolder.Companion.ShowingNothing
1212
* [environment] should always hold a reference to the [Screen] most recently shown
1313
* in [view], with the key [Showing]. [ScreenViewHolder.showing] provides easy access
1414
* to it. Note that the shown [Screen] may not be of type [ScreenT], if this
15-
* [ScreenViewHolder] is wrapped by another one. (See [ScreenViewFactory.unwrapping].)
15+
* [ScreenViewHolder] is wrapped by another one. (See [ScreenViewFactory.toUnwrappingViewFactory].)
1616
*
1717
* Do not call [runner] directly. Use [ScreenViewHolder.show] instead. Or most commonly,
1818
* allow [WorkflowViewStub.show] to call it for you.
@@ -69,6 +69,9 @@ public fun <ScreenT : Screen> ScreenViewHolder<ScreenT>.show(
6969
screen: ScreenT,
7070
environment: ViewEnvironment
7171
) {
72+
// Why is this an extension rather than part of the interface?
73+
// When wrapping, we need to prevent recursive calls from clobbering
74+
// `environment[Showing]` with the nested rendering type.
7275
runner.showRendering(screen, environment + (Showing to screen))
7376
}
7477

@@ -78,8 +81,7 @@ public fun <ScreenT : Screen> ScreenViewHolder<ScreenT>.show(
7881
*/
7982
@WorkflowUiExperimentalApi
8083
public val ScreenViewHolder<*>.showing: Screen
81-
get() =
82-
environment[Showing]
84+
get() = environment[Showing]
8385

8486
@WorkflowUiExperimentalApi
8587
public fun <ScreenT : Screen> ScreenViewHolder(

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/WorkflowViewState.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal sealed class WorkflowViewState<out RenderingT : Any> {
1515
abstract val environment: ViewEnvironment
1616
abstract val showRendering: ViewShowRendering<RenderingT>
1717

18-
/** [bindShowRendering] has been called, [start] has not. */
18+
/** [bindShowRendering] has been called, [startShowing] has not. */
1919
data class New<out RenderingT : Any>(
2020
override val showing: RenderingT,
2121
override val environment: ViewEnvironment,
@@ -27,7 +27,7 @@ internal sealed class WorkflowViewState<out RenderingT : Any> {
2727
}
2828
) : WorkflowViewState<RenderingT>()
2929

30-
/** [start] has been called. It's safe to call [showRendering] now. */
30+
/** [startShowing] has been called. It's safe to call [showRendering] now. */
3131
data class Started<out RenderingT : Any>(
3232
override val showing: RenderingT,
3333
override val environment: ViewEnvironment,

workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/WorkflowViewStub.kt

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -221,23 +221,19 @@ public class WorkflowViewStub @JvmOverloads constructor(
221221
WorkflowLifecycleOwner.get(it)?.destroyOnDetach()
222222
}
223223

224-
holder = rendering.buildView(
225-
viewEnvironment,
226-
parent.context,
227-
parent,
228-
viewStarter = { view, doStart ->
224+
holder = rendering.toViewFactory(viewEnvironment)
225+
.startShowing(rendering, viewEnvironment, parent.context, parent) { view, doStart ->
229226
WorkflowLifecycleOwner.installOn(view)
230227
doStart()
231-
}
232-
).also {
233-
val newView = it.view
228+
}.also {
229+
val newView = it.view
234230

235-
if (inflatedId != NO_ID) newView.id = inflatedId
236-
if (updatesVisibility) newView.visibility = visibility
237-
background?.let { newView.background = it }
238-
propagateSavedStateRegistryOwner(newView)
239-
replaceOldViewInParent(parent, newView)
240-
}
231+
if (inflatedId != NO_ID) newView.id = inflatedId
232+
if (updatesVisibility) newView.visibility = visibility
233+
background?.let { newView.background = it }
234+
propagateSavedStateRegistryOwner(newView)
235+
replaceOldViewInParent(parent, newView)
236+
}
241237
}
242238

243239
/**

0 commit comments

Comments
 (0)