Solves crashing when multiple relays with the same url are included in the resulting list.
This commit is contained in:
+4
-2
@@ -233,8 +233,10 @@ class SearchBarViewModel(
|
||||
val lower = term.lowercase()
|
||||
|
||||
val relays =
|
||||
listOfNotNull(relayUrl) +
|
||||
LocalCache.relayHints.relayDB.filter { _, relay -> relay.url.contains(lower) }
|
||||
(
|
||||
listOfNotNull(relayUrl) +
|
||||
LocalCache.relayHints.relayDB.filter { _, relay -> relay.url.contains(lower) }
|
||||
).distinctBy { it.url }
|
||||
|
||||
relays
|
||||
.map { relaySetupInfoBuilder(it) }
|
||||
|
||||
Reference in New Issue
Block a user