From 77eb0663627a8afc0e87376a2a2fae4e85a5d14c Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 27 Dec 2023 17:00:08 -0500 Subject: [PATCH] Fixes the loading of reactions and zaps to replaceable events. --- .../amethyst/service/NostrSingleEventDataSource.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt index 5baf073a4..05c1652fe 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt @@ -22,13 +22,17 @@ object NostrSingleEventDataSource : NostrDataSource("SingleEventFeed") { private var addressesToWatch = setOf() private fun createReactionsToWatchInAddressFilter(): List? { - val addressesToWatch = eventsToWatch.filter { it.address() != null } + addressesToWatch.filter { it.address() != null } + val addressesToWatch = + ( + eventsToWatch.filter { it.address() != null } + + addressesToWatch.filter { it.address() != null } + ).toSet() if (addressesToWatch.isEmpty()) { return null } - return groupByEOSEPresence(eventsToWatch).mapNotNull { + return groupByEOSEPresence(addressesToWatch).map { TypedFilter( types = COMMON_FEED_TYPES, filter = JsonFilter(