Fix relay updating and relay icons

This commit is contained in:
Jon Staab
2025-11-11 17:48:24 -08:00
parent 1a4d45fa9c
commit 2390599e8f
3 changed files with 7 additions and 17 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import {uniqBy, prop, append, ifLet} from "@welshman/lib"
import {uniqBy, prop, ifLet} from "@welshman/lib"
import type {RelayProfile} from "@welshman/util"
import {displayRelayUrl, ManagementMethod} from "@welshman/util"
import {manageRelay, relays, fetchRelayProfileDirectly} from "@welshman/app"
@@ -72,8 +72,8 @@
}
// Force-reload the relay
ifLet(await fetchRelayProfileDirectly(url), relay => {
relays.update($relays => uniqBy(prop("url"), append(relay, $relays)))
ifLet(await fetchRelayProfileDirectly(url), profile => {
relays.update($relays => uniqBy(prop("url"), [{...profile, url}, ...$relays]))
})
pushToast({message: "Your changes have been saved!"})