From 3c1f57fac0bea8f2c351936d7c94ecae5d7a0b85 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 22 Jul 2024 13:57:31 -0400 Subject: [PATCH] Sorts keys before making the filter. --- .../amethyst/service/NostrSingleEventDataSource.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt index 55a1b98f9..588aa3ff6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt @@ -319,6 +319,9 @@ fun groupByEOSEPresence(notes: Set): Collection> = .sorted() .joinToString(",") }.values + .map { + it.sortedBy { it.idHex } + } fun groupByEOSEPresence(users: Iterable): Collection> = users @@ -327,6 +330,9 @@ fun groupByEOSEPresence(users: Iterable): Collection> = .sorted() .joinToString(",") }.values + .map { + it.sortedBy { it.pubkeyHex } + } fun findMinimumEOSEs(notes: List): Map { val minLatestEOSEs = mutableMapOf()