Skip to content

Commit 0f909ea

Browse files
committed
asDialogHolderWithContent, ScreenViewHolder.startShowing
1. `setContent` as a method name gave no clue that we were returning a new manager object, so now it's called `asDialogHolderWithContent` 2. Hard coding the call to `Dialog.setContent` interferes with code that needs to make that call itself. We now accept a `setContent: (ScreenViewHolder<C>) -> Unit` lambda to do that work, which defaults to the current behavior. 3. Decouple building and starting views. This allows us to ensure that a Dialog's content view is attached to its window before its first rendering -- before the first call to `ScreenViewHolder.show`. Necessary to ensure that the strictly view-tree-based AndroidX `findViewTreeOnBackPressedDispatcherOwner()` call works immediately. This was always the original intention, but never actually found a use case until now. 4. Moves most of that default behavior to a public `Dialog.fixBackgroundAndDimming` extension function to keep it available and more self documenting (hard learned lessons in there). Pretty similar to how `ScreenOverlayDialogFactory` acts. 5. Big kdoc update
1 parent e702e8a commit 0f909ea

File tree

17 files changed

+314
-168
lines changed

17 files changed

+314
-168
lines changed

samples/containers/android/src/main/java/com/squareup/sample/container/panel/PanelOverlayDialogFactory.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import com.squareup.workflow1.ui.ViewEnvironment
99
import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
1010
import com.squareup.workflow1.ui.container.OverlayDialogFactory
1111
import com.squareup.workflow1.ui.container.OverlayDialogHolder
12+
import com.squareup.workflow1.ui.container.asDialogHolderWithContent
1213
import com.squareup.workflow1.ui.container.setBounds
13-
import com.squareup.workflow1.ui.container.setContent
1414
import kotlin.reflect.KClass
1515

1616
/**
@@ -27,8 +27,11 @@ internal object PanelOverlayDialogFactory : OverlayDialogFactory<PanelOverlay<Sc
2727
): OverlayDialogHolder<PanelOverlay<Screen>> {
2828
val dialog = AppCompatDialog(context, R.style.PanelDialog)
2929

30-
val realHolder = dialog.setContent(initialRendering, initialEnvironment)
30+
val realHolder = dialog.asDialogHolderWithContent(initialRendering, initialEnvironment)
3131

32+
// We replace the default onUpdateBounds function with one that gives the
33+
// panel a square shape on tablets. See OverlayDialogFactory for more details
34+
// on the bounds mechanism.
3235
return object : OverlayDialogHolder<PanelOverlay<Screen>> by realHolder {
3336
override val onUpdateBounds: ((Rect) -> Unit) = { bounds ->
3437
val refinedBounds: Rect = if (!dialog.context.isTablet) {

workflow-ui/compose/src/androidTest/java/com/squareup/workflow1/ui/compose/ComposeViewTreeIntegrationTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import com.squareup.workflow1.ui.container.BackStackScreen
3939
import com.squareup.workflow1.ui.container.BodyAndOverlaysScreen
4040
import com.squareup.workflow1.ui.container.OverlayDialogFactory
4141
import com.squareup.workflow1.ui.container.ScreenOverlay
42-
import com.squareup.workflow1.ui.container.setContent
42+
import com.squareup.workflow1.ui.container.asDialogHolderWithContent
4343
import com.squareup.workflow1.ui.internal.test.IdleAfterTestRule
4444
import com.squareup.workflow1.ui.internal.test.IdlingDispatcherRule
4545
import com.squareup.workflow1.ui.internal.test.WorkflowUiTestActivity
@@ -584,7 +584,7 @@ internal class ComposeViewTreeIntegrationTest {
584584

585585
override val dialogFactory =
586586
OverlayDialogFactory<TestOverlay> { initialRendering, initialEnvironment, context: Context ->
587-
ComponentDialog(context).setContent(initialRendering, initialEnvironment)
587+
ComponentDialog(context).asDialogHolderWithContent(initialRendering, initialEnvironment)
588588
}
589589
}
590590

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public abstract class ModalContainer<ModalRenderingT : Any> @JvmOverloads constr
9090
// any, and so we can use our lifecycle to destroy-on-detach the dialog hierarchy.
9191
WorkflowLifecycleOwner.installOn(
9292
dialogView,
93-
(ref.dialog as? OnBackPressedDispatcherOwner)
93+
onBackPressedDispatcherOwner = (ref.dialog as? OnBackPressedDispatcherOwner)
9494
?: viewEnvironment.onBackPressedDispatcherOwner(this),
9595
findParentLifecycle = { parentLifecycleOwner.lifecycle }
9696
)

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public final class com/squareup/workflow1/ui/ScreenViewFactoryFinder$DefaultImpl
129129

130130
public final class com/squareup/workflow1/ui/ScreenViewFactoryKt {
131131
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;
132+
public static final fun startShowing (Lcom/squareup/workflow1/ui/ScreenViewHolder;Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Lcom/squareup/workflow1/ui/ViewStarter;)V
132133
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;
133134
public static final fun toViewFactory (Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;)Lcom/squareup/workflow1/ui/ScreenViewFactory;
134135
}
@@ -306,7 +307,8 @@ public final class com/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistry
306307
public fun <init> ()V
307308
public final fun attachToParentRegistry (Ljava/lang/String;Landroidx/savedstate/SavedStateRegistryOwner;)V
308309
public final fun detachFromParentRegistry ()V
309-
public final fun installChildRegistryOwnerOn (Landroid/view/View;Ljava/lang/String;)V
310+
public final fun installChildRegistryOwnerOn (Landroid/view/View;Ljava/lang/String;Z)V
311+
public static synthetic fun installChildRegistryOwnerOn$default (Lcom/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistryAggregator;Landroid/view/View;Ljava/lang/String;ZILjava/lang/Object;)V
310312
public final fun pruneAllChildRegistryOwnersExcept (Ljava/util/Collection;)V
311313
public static synthetic fun pruneAllChildRegistryOwnersExcept$default (Lcom/squareup/workflow1/ui/androidx/WorkflowSavedStateRegistryAggregator;Ljava/util/Collection;ILjava/lang/Object;)V
312314
public final fun saveAndPruneChildRegistryOwner (Ljava/lang/String;)V
@@ -331,6 +333,12 @@ public abstract interface class com/squareup/workflow1/ui/container/AndroidOverl
331333
public abstract fun getDialogFactory ()Lcom/squareup/workflow1/ui/container/OverlayDialogFactory;
332334
}
333335

336+
public final class com/squareup/workflow1/ui/container/AsDialogHolderWithContentKt {
337+
public static final fun asDialogHolderWithContent (Landroidx/activity/ComponentDialog;Lcom/squareup/workflow1/ui/container/ScreenOverlay;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/container/OverlayDialogHolder;
338+
public static synthetic fun asDialogHolderWithContent$default (Landroidx/activity/ComponentDialog;Lcom/squareup/workflow1/ui/container/ScreenOverlay;Lcom/squareup/workflow1/ui/ViewEnvironment;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/squareup/workflow1/ui/container/OverlayDialogHolder;
339+
public static final fun fixBackgroundAndDimming (Landroid/app/Dialog;)V
340+
}
341+
334342
public final class com/squareup/workflow1/ui/container/BackButtonScreen : com/squareup/workflow1/ui/AndroidScreen, com/squareup/workflow1/ui/Wrapper {
335343
public fun <init> (Lcom/squareup/workflow1/ui/Screen;ZLkotlin/jvm/functions/Function0;)V
336344
public synthetic fun <init> (Lcom/squareup/workflow1/ui/Screen;ZLkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
@@ -376,10 +384,6 @@ public final class com/squareup/workflow1/ui/container/BackStackContainer$SavedS
376384
public synthetic fun newArray (I)[Ljava/lang/Object;
377385
}
378386

379-
public final class com/squareup/workflow1/ui/container/ComponentDialogSetContentKt {
380-
public static final fun setContent (Landroidx/activity/ComponentDialog;Lcom/squareup/workflow1/ui/container/ScreenOverlay;Lcom/squareup/workflow1/ui/ViewEnvironment;)Lcom/squareup/workflow1/ui/container/OverlayDialogHolder;
381-
}
382-
383387
public final class com/squareup/workflow1/ui/container/LayeredDialogSessions {
384388
public static final field Companion Lcom/squareup/workflow1/ui/container/LayeredDialogSessions$Companion;
385389
public synthetic fun <init> (Landroid/content/Context;Lkotlinx/coroutines/flow/StateFlow;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/internal/DefaultConstructorMarker;)V

workflow-ui/core-android/src/androidTest/java/com/squareup/workflow1/ui/container/DialogIntegrationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ internal class DialogIntegrationTest {
6666

6767
override val dialogFactory = OverlayDialogFactory<DialogRendering> { r, e, c ->
6868
val dialog = ComponentDialog(c).also { latestDialog = it }
69-
dialog.setContent(r, e)
69+
dialog.asDialogHolderWithContent(r, e)
7070
}
7171
}
7272

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public typealias BackPressHandler = () -> Unit
2727
*/
2828
@Suppress("DEPRECATION")
2929
@WorkflowUiExperimentalApi
30-
@Deprecated("Use setOrClearBackHandler")
30+
@Deprecated("Use setBackHandler")
3131
public var View.backPressedHandler: BackPressHandler?
3232
get() = observerOrNull?.handler
3333
set(value) {

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

Lines changed: 94 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,33 @@ public typealias ViewBindingInflater<BindingT> = (LayoutInflater, ViewGroup?, Bo
2525
* It is rare to call [buildView] directly. Instead the most common path is to pass [Screen]
2626
* instances to [WorkflowViewStub.show], which will apply the [ScreenViewFactory] machinery for you.
2727
*
28-
* If you are building a custom container and [WorkflowViewStub] is too restrictive, use
29-
* [ScreenViewFactory.startShowing].
28+
* If you are building a custom container and for some reason can't delegate to
29+
* [WorkflowViewStub], here is how to do the work yourself:
30+
*
31+
* - Call [Screen.toViewFactory], which uses the [ScreenViewFactoryFinder] in the
32+
* given [ViewEnvironment] to return the [ScreenViewFactory] bound to the type
33+
* of the receiving [Screen].
34+
*
35+
* - Call [ScreenViewFactory.buildView] to build a view wrapped in the [ScreenViewHolder]
36+
* that manages it.
37+
*
38+
* - Call [ScreenViewHolder.startShowing] to initialize the new view with its
39+
* first [Screen] rendering, taking care to include a [ViewStarter] lambda that invokes
40+
* [WorkflowLifecycleOwner.installOn][com.squareup.workflow1.ui.androidx.WorkflowLifecycleOwner.installOn]
41+
*
42+
* - On subsequent updates, if [ScreenViewHolder.canShow] returns true, call [ScreenViewHolder.show]
43+
*
44+
* - If [ScreenViewHolder.canShow] returns false, it is time to tear your [ScreenViewHolder]
45+
* down. Be sure to call
46+
* [WorkflowLifecycleOwner.destroyOnDetach][com.squareup.workflow1.ui.androidx.WorkflowLifecycleOwner.destroyOnDetach]
47+
* on the managed [view][ScreenViewHolder.view]!
3048
*/
3149
@WorkflowUiExperimentalApi
3250
public interface ScreenViewFactory<in ScreenT : Screen> : ViewRegistry.Entry<ScreenT> {
3351
/**
3452
* It is rare to call this method directly. Instead the most common path is to pass [Screen]
3553
* instances to [WorkflowViewStub.show], which will apply the [ScreenViewFactory] machinery for
3654
* you.
37-
*
38-
* Called by [startShowing] to create a [ScreenViewHolder] wrapping a [View] able to display a
39-
* stream of [ScreenT] renderings, starting with [initialRendering].
4055
*/
4156
public fun buildView(
4257
initialRendering: ScreenT,
@@ -256,11 +271,8 @@ public interface ScreenViewFactory<in ScreenT : Screen> : ViewRegistry.Entry<Scr
256271

257272
/**
258273
* It is rare to call this method directly. Instead the most common path is to pass [Screen]
259-
* instances to [WorkflowViewStub.show], which will apply the [ScreenViewFactory] machinery for you.
260-
*
261-
* Use the [ScreenViewFactoryFinder] in [environment] to return the [ScreenViewFactory] bound to the
262-
* type of the receiving [Screen]. Call [ScreenViewFactory.startShowing] to create and initialize a
263-
* new [View].
274+
* instances to [WorkflowViewStub.show], which will apply the [ScreenViewFactory] and
275+
* [ScreenViewHolder] machinery for you. See [ScreenViewFactory] for details.
264276
*/
265277
@WorkflowUiExperimentalApi
266278
public fun <ScreenT : Screen> ScreenT.toViewFactory(
@@ -271,83 +283,74 @@ public fun <ScreenT : Screen> ScreenT.toViewFactory(
271283

272284
/**
273285
* It is rare to call this method directly. Instead the most common path is to pass [Screen]
274-
* instances to [WorkflowViewStub.show], which will apply the [ScreenViewFactory] machinery for you.
286+
* instances to [WorkflowViewStub.show], which will apply the [ScreenViewFactory] and
287+
* [ScreenViewHolder] machinery for you. See [ScreenViewFactory] for details.
275288
*
276-
* Creates a [ScreenViewHolder] wrapping a [View] able to display a stream of [ScreenT] renderings,
277-
* starting with [initialRendering].
289+
* Initializes a [ScreenViewHolder] that has just been created by [ScreenViewFactory.buildView].
278290
*
279291
* To add more initialization behavior (typically a call to
280292
* [WorkflowLifecycleOwner.installOn][com.squareup.workflow1.ui.androidx.WorkflowLifecycleOwner.installOn]),
281293
* provide a [viewStarter].
282294
*/
283295
@Suppress("DEPRECATION")
284296
@WorkflowUiExperimentalApi
285-
public fun <ScreenT : Screen> ScreenViewFactory<ScreenT>.startShowing(
297+
public fun <ScreenT : Screen> ScreenViewHolder<ScreenT>.startShowing(
286298
initialRendering: ScreenT,
287299
initialEnvironment: ViewEnvironment,
288-
contextForNewView: Context,
289-
container: ViewGroup? = null,
290-
viewStarter: ViewStarter? = null
291-
): ScreenViewHolder<ScreenT> {
292-
return buildView(
293-
initialRendering,
294-
initialEnvironment,
295-
contextForNewView,
296-
container
297-
).also { holder ->
298-
val resolvedStarter = viewStarter ?: ViewStarter { _, doStart -> doStart() }
300+
viewStarter: ViewStarter?
301+
) {
302+
val resolvedStarter = viewStarter ?: ViewStarter { _, doStart -> doStart() }
299303

300-
val legacyStarter: ((View) -> Unit)? = holder.view.starterOrNull
304+
val legacyStarter: ((View) -> Unit)? = view.starterOrNull
301305

302-
if (legacyStarter != null) {
303-
var shown = false
304-
// This View was built by a legacy ViewFactory, and so it needs to be
305-
// started in just the right way.
306-
//
307-
// The tricky bit is the old starter's default value, a function that calls
308-
// View.showRendering(). Odds are it's wrapped and wrapped again deep inside
309-
// legacyStarter. To ensure it gets called at the right time, and that we don't
310-
// update the view redundantly, we use bindShowRendering to replace View.showRendering()
311-
// with a call to our own holder.show(). (No need to call the original showRendering(),
312-
// AsScreenViewFactory blanked it.)
313-
//
314-
// This same call to bindShowRendering will also update View.getRendering() and
315-
// View.environment() to return what was passed in here, as expected.
316-
holder.view.bindShowRendering(
317-
initialRendering,
318-
initialEnvironment
319-
) { rendering, environment ->
320-
holder.show(rendering, environment)
321-
shown = true
322-
}
323-
holder.view.starter = { startingView ->
324-
resolvedStarter.startView(startingView) { legacyStarter(startingView) }
325-
}
326-
// We have to call View.start() to fire this off rather than calling the starter directly,
327-
// to keep the rest of the legacy machinery happy.
328-
holder.view.start()
329-
check(shown) {
330-
"A ViewStarter provided to ViewRegistry.buildView or a DecorativeViewFactory " +
331-
"neglected to call the given doStart() function"
332-
}
333-
} else {
334-
var shown = false
335-
resolvedStarter.startView(holder.view) {
336-
holder.show(initialRendering, initialEnvironment)
337-
shown = true
338-
}
339-
check(shown) {
340-
"A ViewStarter provided to ScreenViewFactory.startShowing " +
341-
"neglected to call the given doStart() function"
342-
}
306+
if (legacyStarter != null) {
307+
var shown = false
308+
// This View was built by a legacy ViewFactory, and so it needs to be
309+
// started in just the right way.
310+
//
311+
// The tricky bit is the old starter's default value, a function that calls
312+
// View.showRendering(). Odds are it's wrapped and wrapped again deep inside
313+
// legacyStarter. To ensure it gets called at the right time, and that we don't
314+
// update the view redundantly, we use bindShowRendering to replace View.showRendering()
315+
// with a call to our own holder.show(). (No need to call the original showRendering(),
316+
// AsScreenViewFactory blanked it.)
317+
//
318+
// This same call to bindShowRendering will also update View.getRendering() and
319+
// View.environment() to return what was passed in here, as expected.
320+
view.bindShowRendering(
321+
initialRendering,
322+
initialEnvironment
323+
) { rendering, environment ->
324+
show(rendering, environment)
325+
shown = true
326+
}
327+
view.starter = { startingView ->
328+
resolvedStarter.startView(startingView) { legacyStarter(startingView) }
329+
}
330+
// We have to call View.start() to fire this off rather than calling the starter directly,
331+
// to keep the rest of the legacy machinery happy.
332+
view.start()
333+
check(shown) {
334+
"$viewStarter neglected to call the given doStart() function when showing $initialRendering"
335+
}
336+
} else {
337+
var shown = false
338+
resolvedStarter.startView(view) {
339+
show(initialRendering, initialEnvironment)
340+
shown = true
341+
}
342+
check(shown) {
343+
"$viewStarter neglected to call the given doStart() function when showing $initialRendering"
343344
}
344345
}
345346
}
346347

347348
/**
348-
* A wrapper for the function invoked when [ScreenViewFactory.startShowing] is called, allowing
349+
* A wrapper for the function invoked when [ScreenViewHolder.startShowing] is called, allowing
349350
* for custom initialization of a newly built [View] before or after the first call to
350-
* [ScreenViewHolder.show].
351+
* [ScreenViewHolder.show]. Most typical use is to call
352+
* [WorkflowLifecycleOwner.installOn][com.squareup.workflow1.ui.androidx.WorkflowLifecycleOwner.installOn]),
353+
* at just the right moment.
351354
*/
352355
@WorkflowUiExperimentalApi
353356
public fun interface ViewStarter {
@@ -358,6 +361,28 @@ public fun interface ViewStarter {
358361
)
359362
}
360363

364+
/**
365+
* Convenience that combines [ScreenViewFactory.buildView] and [ScreenViewHolder.startShowing],
366+
* since we rarely need to do work between those two calls.
367+
*/
368+
@WorkflowUiExperimentalApi
369+
public fun <ScreenT : Screen> ScreenViewFactory<ScreenT>.startShowing(
370+
initialRendering: ScreenT,
371+
initialEnvironment: ViewEnvironment,
372+
contextForNewView: Context,
373+
container: ViewGroup? = null,
374+
viewStarter: ViewStarter? = null
375+
): ScreenViewHolder<ScreenT> {
376+
return buildView(
377+
initialRendering,
378+
initialEnvironment,
379+
contextForNewView,
380+
container
381+
).apply {
382+
startShowing(initialRendering, initialEnvironment, viewStarter)
383+
}
384+
}
385+
361386
/**
362387
* Transforms a [ScreenViewFactory] of [TransformedT] into one that can handle
363388
* instances of [SourceT].

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,18 @@ public class WorkflowSavedStateRegistryAggregator {
211211
* [WorkflowSavedStateRegistryAggregator]. Typically this is derived from the
212212
* [compatibility key][com.squareup.workflow1.ui.Compatible.keyFor] of the [view]'s
213213
* rendering.
214+
*
215+
* @param force when this is true we're asserting that it's okay to clobber an
216+
* existing registry that may have been put in place by Android. If we find
217+
* one of our own [KeyedSavedStateRegistryOwner], we will still throw an exception.
218+
*
219+
* @throws IllegalArgumentException is [key] is already in use or if [view] has an
220+
* unexpected [SavedStateRegistryOwner] in place already.
214221
*/
215222
public fun installChildRegistryOwnerOn(
216223
view: View,
217-
key: String
224+
key: String,
225+
force: Boolean = false
218226
) {
219227
val lifecycleOwner = requireNotNull(ViewTreeLifecycleOwner.get(view)) {
220228
"Expected $view($key) to have a ViewTreeLifecycleOwner. " +
@@ -224,9 +232,13 @@ public class WorkflowSavedStateRegistryAggregator {
224232
children.put(key, registryOwner)?.let {
225233
throw IllegalArgumentException("$key is already in use, it cannot be used to register $view")
226234
}
227-
view.findViewTreeSavedStateRegistryOwner()?.let {
228-
throw IllegalArgumentException("$view already has SavedStateRegistryOwner: $it")
229-
}
235+
view.findViewTreeSavedStateRegistryOwner()
236+
?.takeIf { !force || it is KeyedSavedStateRegistryOwner }
237+
?.let {
238+
throw IllegalArgumentException(
239+
"Using $key to register $view, but it already has SavedStateRegistryOwner: $it"
240+
)
241+
}
230242
view.setViewTreeSavedStateRegistryOwner(registryOwner)
231243
restoreIfOwnerReady(registryOwner)
232244
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
1313
*
1414
* - [ScreenOverlay] for dialogs whose content is defined by a wrapped
1515
* [Screen][com.squareup.workflow1.ui.Screen] instance. And in this case,
16-
* also note the [ComponentDialog.setContent][setContent] extension function.
16+
* also note the [ComponentDialog.asDialogHolderWithContent][asDialogHolderWithContent]
17+
* extension function.
1718
*
1819
* For example:
1920
*

0 commit comments

Comments
 (0)