Skip to content

Commit 1a40760

Browse files
Merge pull request #1330 from square/zachklipp/envscreen-tostring
Give EnvironmentScreen a toString to help when debugging.
2 parents 8d87810 + d3cd804 commit 1a40760

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

workflow-ui/core-common/api/core-common.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public final class com/squareup/workflow1/ui/EnvironmentScreen : com/squareup/wo
4545
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Container;
4646
public fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/EnvironmentScreen;
4747
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Wrapper;
48+
public fun toString ()Ljava/lang/String;
4849
}
4950

5051
public final class com/squareup/workflow1/ui/EnvironmentScreenKt {

workflow-ui/core-common/src/main/java/com/squareup/workflow1/ui/EnvironmentScreen.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ public class EnvironmentScreen<out C : Screen>(
1414
) : Wrapper<Screen, C>, Screen {
1515
override fun <D : Screen> map(transform: (C) -> D): EnvironmentScreen<D> =
1616
EnvironmentScreen(transform(content), environment)
17+
18+
override fun toString(): String = "EnvironmentScreen(" +
19+
"content key=${Compatible.keyFor(content)}, " +
20+
"environment=$environment" +
21+
")"
1722
}
1823

1924
/**

0 commit comments

Comments
 (0)