mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
fix(location): single location control on the geo-post screen
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YU8YLcjH9ALr4PgdAkGPZh
This commit is contained in:
+10
-4
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user