chore: add WearException EventData equal and hash
This commit is contained in:
parent
5eec69d863
commit
7e61c54c97
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue