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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android.useAndroidX=true
systemProp.org.gradle.internal.publish.checksums.insecure=true

GROUP=com.squareup.workflow1
VERSION_NAME=1.8.0-uiUpdate02-SNAPSHOT
VERSION_NAME=1.8.0-uiUpdate03-SNAPSHOT

POM_DESCRIPTION=Square Workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import com.squareup.workflow1.ui.canShow
import com.squareup.workflow1.ui.compatible
import com.squareup.workflow1.ui.container.BackStackConfig.First
import com.squareup.workflow1.ui.container.BackStackConfig.Other
import com.squareup.workflow1.ui.container.ViewStateCache.Saved
import com.squareup.workflow1.ui.show
import com.squareup.workflow1.ui.startShowing
import com.squareup.workflow1.ui.toViewFactory
Expand Down Expand Up @@ -201,7 +200,7 @@ public open class BackStackContainer @JvmOverloads constructor(
}

public constructor(source: Parcel) : super(source) {
this.savedViewState = source.readParcelable(ViewStateCache.Saved::class.java.classLoader)!!
savedViewState = source.readParcelable(ViewStateCache.Saved::class.java.classLoader)!!
}

public val savedViewState: ViewStateCache.Saved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class AsScreen<W : Any>(
}

override val compatibilityKey: String
get() = Compatible.keyFor(rendering)
get() = Compatible.keyFor(rendering, "AsScreen")
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public data class Named<W : Any>(
require(name.isNotBlank()) { "name must not be blank." }
}

override val compatibilityKey: String = Compatible.keyFor(wrapped, name)
override val compatibilityKey: String = Compatible.keyFor(wrapped, "Named($name)")

override fun toString(): String {
return "${super.toString()}: $compatibilityKey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public data class NamedScreen<W : Screen>(
require(name.isNotBlank()) { "name must not be blank." }
}

override val compatibilityKey: String = Compatible.keyFor(wrapped, name)
override val compatibilityKey: String = Compatible.keyFor(wrapped, "NamedScreen($name)")

override fun toString(): String {
return "${super.toString()}: $compatibilityKey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal class NamedScreenTest {

@Test fun `recursive keys are legible`() {
assertThat(NamedScreen(NamedScreen(Hey, "one"), "ho").compatibilityKey)
.isEqualTo("com.squareup.workflow1.ui.NamedScreenTest\$Hey+one+ho")
.isEqualTo("com.squareup.workflow1.ui.NamedScreenTest\$Hey+NamedScreen(one)+NamedScreen(ho)")
}

private class Foo(override val compatibilityKey: String) : Compatible, Screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal class NamedTest {

@Test fun `recursive keys are legible`() {
assertThat(Named(Named(Hey, "one"), "ho").compatibilityKey)
.isEqualTo("com.squareup.workflow1.ui.NamedTest\$Hey+one+ho")
.isEqualTo("com.squareup.workflow1.ui.NamedTest\$Hey+Named(one)+Named(ho)")
}

private class Foo(override val compatibilityKey: String) : Compatible
Expand Down