refactoring

This commit is contained in:
Vitor Pamplona
2023-02-04 13:30:39 -05:00
parent ea59568b6f
commit 80bc09df92

View File

@@ -65,7 +65,7 @@ class NewRelayListViewModel: ViewModel() {
} }
fun addRelay(relay: Relay) { fun addRelay(relay: Relay) {
if (relays.value.filter { it.url == relay.url }.isNotEmpty()) return if (relays.value.any { it.url == relay.url }) return
_relays.update { _relays.update {
it.plus(relay) it.plus(relay)