mirror of
https://github.com/slhaf/Partner.git
synced 2026-06-27 17:49:16 +08:00
fix(impression): compare active entities by runtimeId
This commit is contained in:
@@ -112,6 +112,16 @@ class ActiveEntity @JvmOverloads constructor(
|
||||
|
||||
private fun modelTime(time: Instant): String =
|
||||
time.atZone(ZoneId.systemDefault()).toString()
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is ActiveEntity) return false
|
||||
return runtimeId == other.runtimeId
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return runtimeId.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
private fun newActiveEntityRuntimeId(): String =
|
||||
|
||||
Reference in New Issue
Block a user