chore: add WearException EventData equal and hash

This commit is contained in:
Andries Smit 2022-07-13 22:39:31 +02:00
parent 5eec69d863
commit 7e61c54c97

View file

@ -35,7 +35,18 @@ sealed class EventData : Event() {
val model: String,
val manufacturer: String,
val product: String
) : EventData()
) : EventData() {
override fun equals(other: Any?): Boolean =
when (other) {
!is WearException -> false
else -> timeStamp == other.timeStamp && fingerprint == other.fingerprint
}
override fun hashCode(): Int {
return Objects.hash(timeStamp, fingerprint)
}
}
@Serializable
data class Error(val timeStamp: Long) : EventData() // ignored