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