feat: make relay rows clickable to open relay info dialog on profile page
Adds onClick parameter to RelayCompose and navigates to RelayInformationScreen when a relay row is tapped in the profile relay tab. https://claude.ai/code/session_01PBFQz53xzXoFsEHD5Ghyqr
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
package com.vitorpamplona.amethyst.ui.note
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -59,11 +60,12 @@ fun RelayCompose(
|
||||
accountViewModel: AccountViewModel,
|
||||
onAddRelay: () -> Unit,
|
||||
onRemoveRelay: () -> Unit,
|
||||
onClick: (() -> Unit)? = null,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
Row(
|
||||
modifier = StdPadding,
|
||||
modifier = StdPadding.then(if (onClick != null) Modifier.clickable(onClick = onClick) else Modifier),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Column(
|
||||
|
||||
+3
@@ -105,6 +105,9 @@ private fun RenderRelayRow(
|
||||
onRemoveRelay = {
|
||||
nav.nav(Route.EditRelays)
|
||||
},
|
||||
onClick = {
|
||||
nav.nav(Route.RelayInfo(relay.url.url))
|
||||
},
|
||||
)
|
||||
HorizontalDivider(
|
||||
thickness = DividerThickness,
|
||||
|
||||
Reference in New Issue
Block a user