mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-01 22:30:42 +02:00
fixes bug when updating relay list that used keep the previous list.
This commit is contained in:
@ -32,10 +32,9 @@ class NewRelayListViewModel : ViewModel() {
|
|||||||
relays.let {
|
relays.let {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
account.saveRelayList(it.value)
|
account.saveRelayList(it.value)
|
||||||
|
clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clear()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun loadRelayDocuments() {
|
fun loadRelayDocuments() {
|
||||||
@ -120,7 +119,7 @@ class NewRelayListViewModel : ViewModel() {
|
|||||||
|
|
||||||
fun deleteAll() {
|
fun deleteAll() {
|
||||||
_relays.update { relays ->
|
_relays.update { relays ->
|
||||||
relays.dropWhile { relays.isNotEmpty() }
|
emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user