Skip to content

Commit 47d58ca

Browse files
committed
Makes TextController support equals
1 parent c562558 commit 47d58ca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,17 @@ private class TextControllerImpl(initialValue: String) : TextController {
8787
set(value) {
8888
_textValue.value = value
8989
}
90+
91+
override fun equals(other: Any?): Boolean {
92+
if (this === other) return true
93+
if (javaClass != other?.javaClass) return false
94+
95+
other as TextController
96+
97+
return textValue == other.textValue
98+
}
99+
100+
override fun hashCode(): Int {
101+
return textValue.hashCode()
102+
}
90103
}

0 commit comments

Comments
 (0)