mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
Avoids duplicating urls in relay list add.
This commit is contained in:
parent
a47aaab83c
commit
8d3d543318
@ -65,6 +65,8 @@ class NewRelayListViewModel: ViewModel() {
|
||||
}
|
||||
|
||||
fun addRelay(relay: Relay) {
|
||||
if (relays.value.filter { it.url == relay.url }.isNotEmpty()) return
|
||||
|
||||
_relays.update {
|
||||
it.plus(relay)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user