File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
channel-event-bus/src/commonMain/kotlin/com/hoc081098/channeleventbus Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,15 @@ private class Bus private constructor(
136
136
val channel : Channel <Any >,
137
137
val isCollecting : Boolean ,
138
138
) {
139
- fun copy (isCollecting : Boolean = this.isCollecting): Bus = Bus (channel, isCollecting)
139
+ fun copy (isCollecting : Boolean ): Bus = Bus (channel, isCollecting)
140
+
141
+ override fun hashCode () = 31 * channel.hashCode() + isCollecting.hashCode()
142
+
143
+ override fun equals (other : Any? ): Boolean {
144
+ if (this == = other) return true
145
+ if (other !is Bus ) return false
146
+ return channel == other.channel && isCollecting == other.isCollecting
147
+ }
140
148
141
149
override fun toString (): String = " ${super .toString()} ($channel , $isCollecting )"
142
150
You can’t perform that action at this time.
0 commit comments