From a87d4688a8dfbabbd544a8444b40be343eb803a6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 01:50:02 +0000 Subject: [PATCH] fix(location): single location control on the geo-post screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The geo-post composer showed two locations: the static external-id marker at the top and the new "Posting to ยท Change" row below the message. Drop the duplicate and, for the geohash case, render the interactive channel control (with retarget) in the marker's place. Non-geohash external ids still use DisplayExternalId. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01YU8YLcjH9ALr4PgdAkGPZh --- .../note/nip22Comments/GenericCommentPostScreen.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt index d466f17f9b..6baef9f1a2 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt @@ -106,6 +106,7 @@ import com.vitorpamplona.amethyst.ui.theme.StdVertSpacer import com.vitorpamplona.amethyst.ui.theme.SuggestionListDefaultHeightPage import com.vitorpamplona.amethyst.ui.theme.replyModifier import com.vitorpamplona.quartz.nip01Core.core.HexKey +import com.vitorpamplona.quartz.nip73ExternalIds.location.GeohashId import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableSet @@ -244,9 +245,16 @@ private fun GenericCommentPostBody( ) { Column(Modifier.fillMaxWidth().verticalScroll(scrollState, reverseScrolling = true)) { postViewModel.externalIdentity?.let { - Row { - DisplayExternalId(it, accountViewModel, nav) + if (it is GeohashId) { + // Geo-post: the interactive location channel (with retarget) replaces + // the static external-id marker so there's a single location control. + GeoPostLocationChannel(postViewModel) Spacer(modifier = StdVertSpacer) + } else { + Row { + DisplayExternalId(it, accountViewModel, nav) + Spacer(modifier = StdVertSpacer) + } } } @@ -311,8 +319,6 @@ private fun GenericCommentPostBody( ) } - GeoPostLocationChannel(postViewModel) - DisplayPreviews(postViewModel.urlPreviews, accountViewModel, nav) if (postViewModel.wantsToMarkAsSensitive) {