mirror of
https://github.com/slhaf/Partner.git
synced 2026-06-28 01:59:17 +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 =
|
private fun modelTime(time: Instant): String =
|
||||||
time.atZone(ZoneId.systemDefault()).toString()
|
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 =
|
private fun newActiveEntityRuntimeId(): String =
|
||||||
|
|||||||
Reference in New Issue
Block a user