refactor(desktop): Desktop's own NIP-65 and Blossom list states move to desktopApp

commons had a Nip65RelayListState, a Nip65RelayListRepository and a
BlossomServerListState that only the current Desktop app used: lighter
forks of the Android app's classes of the same names. The app's versions
are about to move into commons under those names (Account's group), and
the current Desktop app is being replaced by the shared UI, so its forks go
with it into desktopApp/model rather than blocking the canonical names.

Only package lines and imports change; nine Desktop files are repointed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7FuNBSKiyVecARSoE4B9P
This commit is contained in:
Claude
2026-09-28 03:53:19 +00:00
parent a9572047b9
commit 497b9ea273
12 changed files with 9 additions and 14 deletions
@@ -386,7 +386,7 @@ class DesktopLocalCache : ICacheProvider {
/**
* Consumes a kind 10063 (NIP-B7) Blossom media server list event. Stores
* the newest per-author copy in [addressableNotes] so state holders like
* [com.vitorpamplona.amethyst.commons.model.nipB7Blossom.BlossomServerListState]
* [com.vitorpamplona.amethyst.desktop.model.BlossomServerListState]
* observe it via their flows. This is the same event the Amethyst mobile
* app uses for the media server list. Emits nothing to the event stream —
* the UI doesn't render kind 10063s directly.
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.commons.model.nipB7Blossom
package com.vitorpamplona.amethyst.desktop.model
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.NoteState
@@ -23,7 +23,7 @@ package com.vitorpamplona.amethyst.desktop.model
/**
* Fallback media server used when the account has published no kind-10063
* Blossom server list yet. The list itself is read reactively from the account's
* [com.vitorpamplona.amethyst.commons.model.nipB7Blossom.BlossomServerListState]
* [com.vitorpamplona.amethyst.desktop.model.BlossomServerListState]
* (`iAccount.blossomServerList.flow`); this is only the empty-list default.
*/
const val DEFAULT_BLOSSOM_SERVER = "https://blossom.primal.net"
@@ -29,9 +29,6 @@ import com.vitorpamplona.amethyst.commons.model.nip02FollowList.Kind3FollowListR
import com.vitorpamplona.amethyst.commons.model.nip02FollowList.Kind3FollowListState
import com.vitorpamplona.amethyst.commons.model.nip51Lists.BookmarkListState
import com.vitorpamplona.amethyst.commons.model.nip51Lists.OldBookmarkListState
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListRepository
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListState
import com.vitorpamplona.amethyst.commons.model.nipB7Blossom.BlossomServerListState
import com.vitorpamplona.amethyst.commons.model.privateChats.ChatroomList
import com.vitorpamplona.amethyst.commons.moderation.PreferencesSensitiveContentSettings
import com.vitorpamplona.amethyst.commons.relayClient.nip17Dm.DmInboxRelayResolver
@@ -21,7 +21,6 @@
package com.vitorpamplona.amethyst.desktop.model
import com.vitorpamplona.amethyst.commons.defaults.DefaultSearchRelayList
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListState
import com.vitorpamplona.amethyst.commons.relays.index.PreferencesIndexRelays
import com.vitorpamplona.amethyst.desktop.network.DefaultRelays
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
@@ -20,7 +20,6 @@
*/
package com.vitorpamplona.amethyst.desktop.model
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListState
import com.vitorpamplona.amethyst.commons.relays.health.RelayListKind
import com.vitorpamplona.amethyst.commons.relays.health.RelayListMutator
import com.vitorpamplona.amethyst.commons.relays.health.RelayRemovalResult
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.commons.model.nip65RelayList
package com.vitorpamplona.amethyst.desktop.model
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
import com.vitorpamplona.quartz.nip65RelayList.AdvertisedRelayListEvent
@@ -18,7 +18,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.commons.model.nip65RelayList
package com.vitorpamplona.amethyst.desktop.model
import com.vitorpamplona.amethyst.commons.model.Note
import com.vitorpamplona.amethyst.commons.model.NoteState
@@ -55,7 +55,7 @@ import androidx.compose.ui.input.key.type
import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListState
import com.vitorpamplona.amethyst.desktop.model.Nip65RelayListState
import com.vitorpamplona.amethyst.desktop.network.DefaultRelays
import com.vitorpamplona.quartz.nip01Core.core.Event
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.RelayUrlNormalizer
@@ -45,8 +45,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListState
import com.vitorpamplona.amethyst.desktop.model.DesktopAccountRelays
import com.vitorpamplona.amethyst.desktop.model.Nip65RelayListState
import com.vitorpamplona.amethyst.desktop.network.DesktopRelayConnectionManager
import com.vitorpamplona.quartz.nip01Core.core.Event
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
@@ -39,8 +39,8 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.commons.model.nip65RelayList.Nip65RelayListState
import com.vitorpamplona.amethyst.desktop.model.DesktopAccountRelays
import com.vitorpamplona.amethyst.desktop.model.Nip65RelayListState
import com.vitorpamplona.amethyst.desktop.network.DesktopRelayConnectionManager
import com.vitorpamplona.amethyst.desktop.network.Nip11Fetcher
import com.vitorpamplona.quartz.nip01Core.core.Event
@@ -20,7 +20,7 @@
*/
package com.vitorpamplona.amethyst.desktop.cache
import com.vitorpamplona.amethyst.commons.model.nipB7Blossom.BlossomServerListState
import com.vitorpamplona.amethyst.desktop.model.BlossomServerListState
import com.vitorpamplona.quartz.nip01Core.crypto.KeyPair
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
import com.vitorpamplona.quartz.nip01Core.signers.NostrSignerInternal