mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-29 23:10:39 +02:00
Avoids creating another keySet.
This commit is contained in:
@ -36,7 +36,7 @@ abstract class NostrDataSource(val debugName: String) {
|
|||||||
|
|
||||||
private val clientListener = object : Client.Listener() {
|
private val clientListener = object : Client.Listener() {
|
||||||
override fun onEvent(event: Event, subscriptionId: String, relay: Relay, afterEOSE: Boolean) {
|
override fun onEvent(event: Event, subscriptionId: String, relay: Relay, afterEOSE: Boolean) {
|
||||||
if (subscriptionId in subscriptions.keys) {
|
if (subscriptions.containsKey(subscriptionId)) {
|
||||||
val key = "$debugName $subscriptionId ${event.kind}"
|
val key = "$debugName $subscriptionId ${event.kind}"
|
||||||
val keyValue = eventCounter.get(key)
|
val keyValue = eventCounter.get(key)
|
||||||
if (keyValue != null) {
|
if (keyValue != null) {
|
||||||
|
Reference in New Issue
Block a user