Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions workflow-ui/compose-tooling/api/compose-tooling.api
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public final class com/squareup/workflow1/ui/compose/tooling/PlaceholderViewFact
}

public final class com/squareup/workflow1/ui/compose/tooling/PreviewViewEnvironmentKt {
public static final fun previewViewEnvironment (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ScreenViewFactory;Landroidx/compose/runtime/Composer;II)Lcom/squareup/workflow1/ui/ViewEnvironment;
public static final fun previewViewEnvironment (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ViewFactory;Landroidx/compose/runtime/Composer;II)Lcom/squareup/workflow1/ui/ViewEnvironment;
public static final fun rememberPreviewViewEnvironment (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ScreenViewFactory;Landroidx/compose/runtime/Composer;II)Lcom/squareup/workflow1/ui/ViewEnvironment;
public static final fun rememberPreviewViewEnvironment (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lcom/squareup/workflow1/ui/ViewFactory;Landroidx/compose/runtime/Composer;II)Lcom/squareup/workflow1/ui/ViewEnvironment;
}

public final class com/squareup/workflow1/ui/compose/tooling/ViewFactoriesKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import com.squareup.workflow1.ui.compose.composeViewFactory
viewEnvironmentUpdater: ((ViewEnvironment) -> ViewEnvironment)? = null
) {
val previewEnvironment =
previewViewEnvironment(placeholderModifier, viewEnvironmentUpdater, mainFactory = this)
rememberPreviewViewEnvironment(placeholderModifier, viewEnvironmentUpdater, mainFactory = this)
WorkflowRendering(rendering, previewEnvironment, modifier)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.squareup.workflow1.ui.plus
import kotlin.reflect.KClass

@Deprecated("Use overload with a ScreenViewFactory parameter.")
@Composable internal fun previewViewEnvironment(
@Composable internal fun rememberPreviewViewEnvironment(
placeholderModifier: Modifier,
viewEnvironmentUpdater: ((ViewEnvironment) -> ViewEnvironment)? = null,
mainFactory: ViewFactory<*>? = null
Expand All @@ -42,7 +42,7 @@ import kotlin.reflect.KClass
* [placeholderViewFactory] that will be used to show any renderings that don't match
* [mainFactory]'s type. All placeholders will have [placeholderModifier] applied.
*/
@Composable internal fun previewViewEnvironment(
@Composable internal fun rememberPreviewViewEnvironment(
placeholderModifier: Modifier,
viewEnvironmentUpdater: ((ViewEnvironment) -> ViewEnvironment)? = null,
mainFactory: ScreenViewFactory<*>? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import com.squareup.workflow1.ui.compose.composeScreenViewFactory
viewEnvironmentUpdater: ((ViewEnvironment) -> ViewEnvironment)? = null
) {
val previewEnvironment =
previewViewEnvironment(placeholderModifier, viewEnvironmentUpdater, mainFactory = this)
rememberPreviewViewEnvironment(placeholderModifier, viewEnvironmentUpdater, mainFactory = this)
WorkflowRendering(rendering, previewEnvironment, modifier)
}

Expand Down