From df823102daf5593c18b7e5c132bc899d758bf86f Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 24 Nov 2023 11:53:51 -0500 Subject: [PATCH] Typo --- .../amethyst/service/NostrDataSource.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/NostrDataSource.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/NostrDataSource.kt index cf21e8f00..284bbe185 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/NostrDataSource.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/NostrDataSource.kt @@ -149,29 +149,29 @@ abstract class NostrDataSource(val debugName: String) { // Makes sure to only send an updated filter when it actually changes. subscriptions.values.forEach { updatedSubscription -> - val updatedSubscriotionNewFilters = updatedSubscription.typedFilters + val updatedSubscriptionNewFilters = updatedSubscription.typedFilters if (updatedSubscription.id in currentFilters.keys) { - if (updatedSubscriotionNewFilters == null) { + if (updatedSubscriptionNewFilters == null) { // was active and is not active anymore, just close. Client.close(updatedSubscription.id) } else { // was active and is still active, check if it has changed. if (updatedSubscription.toJson() != currentFilters[updatedSubscription.id]) { Client.close(updatedSubscription.id) - Client.sendFilter(updatedSubscription.id, updatedSubscriotionNewFilters) + Client.sendFilter(updatedSubscription.id, updatedSubscriptionNewFilters) } else { // hasn't changed, does nothing. - Client.sendFilterOnlyIfDisconnected(updatedSubscription.id, updatedSubscriotionNewFilters) + Client.sendFilterOnlyIfDisconnected(updatedSubscription.id, updatedSubscriptionNewFilters) } } } else { - if (updatedSubscriotionNewFilters == null) { + if (updatedSubscriptionNewFilters == null) { // was not active and is still not active, does nothing } else { // was not active and becomes active, sends the filter. if (updatedSubscription.toJson() != currentFilters[updatedSubscription.id]) { - Client.sendFilter(updatedSubscription.id, updatedSubscriotionNewFilters) + Client.sendFilter(updatedSubscription.id, updatedSubscriptionNewFilters) } } }