From de99c5063938863dac4d6f3023822c2f210c03ae Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 29 Oct 2024 12:23:09 -0400 Subject: [PATCH] Adds search.nos.today to bootstrapping relays for search --- .../java/com/vitorpamplona/amethyst/model/AccountSettings.kt | 1 + .../amethyst/ui/actions/relays/AddSearchRelayListDialog.kt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/AccountSettings.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/AccountSettings.kt index 07f4cb5d0..17ef7e69d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/AccountSettings.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/AccountSettings.kt @@ -77,6 +77,7 @@ val DefaultSearchRelayList = RelayUrlFormatter.normalize("wss://relay.nostr.band"), RelayUrlFormatter.normalize("wss://nostr.wine"), RelayUrlFormatter.normalize("wss://relay.noswhere.com"), + RelayUrlFormatter.normalize("wss://search.nos.today"), ) // This has spaces to avoid mixing with a potential NIP-51 list with the same name. diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/relays/AddSearchRelayListDialog.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/relays/AddSearchRelayListDialog.kt index b0c7791f5..7b043c7de 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/relays/AddSearchRelayListDialog.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/relays/AddSearchRelayListDialog.kt @@ -43,6 +43,7 @@ import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R +import com.vitorpamplona.amethyst.model.DefaultSearchRelayList import com.vitorpamplona.amethyst.ui.components.SetDialogToEdgeToEdge import com.vitorpamplona.amethyst.ui.navigation.INav import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel @@ -52,7 +53,6 @@ import com.vitorpamplona.amethyst.ui.stringRes import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer import com.vitorpamplona.amethyst.ui.theme.StdVertSpacer import com.vitorpamplona.amethyst.ui.theme.imageModifier -import com.vitorpamplona.ammolite.relays.Constants import com.vitorpamplona.ammolite.relays.RelayStat @OptIn(ExperimentalMaterial3Api::class) @@ -153,7 +153,7 @@ fun ResetSearchRelaysLonger(postViewModel: SearchRelayListViewModel) { OutlinedButton( onClick = { postViewModel.deleteAll() - Constants.defaultSearchRelaySet.forEach { postViewModel.addRelay(BasicRelaySetupInfo(it, RelayStat())) } + DefaultSearchRelayList.forEach { postViewModel.addRelay(BasicRelaySetupInfo(it, RelayStat())) } postViewModel.loadRelayDocuments() }, ) {