Skip to content

Commit

Permalink
Makes TextController support equals
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwiz committed Oct 21, 2024
1 parent c562558 commit 47d58ca
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,17 @@ private class TextControllerImpl(initialValue: String) : TextController {
set(value) {
_textValue.value = value
}

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as TextController

return textValue == other.textValue
}

override fun hashCode(): Int {
return textValue.hashCode()
}
}

0 comments on commit 47d58ca

Please sign in to comment.