We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce9c51f commit 6c53872Copy full SHA for 6c53872
channel-event-bus/src/commonMain/kotlin/com/hoc081098/channeleventbus/ChannelEventBus.kt
@@ -136,7 +136,15 @@ private class Bus private constructor(
136
val channel: Channel<Any>,
137
val isCollecting: Boolean,
138
) {
139
- fun copy(isCollecting: Boolean = this.isCollecting): Bus = Bus(channel, isCollecting)
+ 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
+ }
148
149
override fun toString(): String = "${super.toString()}($channel, $isCollecting)"
150
0 commit comments