diff --git a/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/EventListView.kt b/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/EventListView.kt index 21358061..fa8818ed 100644 --- a/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/EventListView.kt +++ b/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/EventListView.kt @@ -131,7 +131,8 @@ private fun EventListViewPreview() { profile = Profile( publicKey = "", nostrEventId = "referenced", - displayName = "Frank Talk" + displayName = "Frank Talk", + nip05 = "frank@talk.at" ), ).ListView( onNavigateToEvent = {} diff --git a/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/TextNoteFeedItem.kt b/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/TextNoteFeedItem.kt index 17c30514..e3111151 100644 --- a/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/TextNoteFeedItem.kt +++ b/composeApp/src/commonMain/kotlin/ac/cord/auxiliary/compose/ui/composable/widgets/feed/TextNoteFeedItem.kt @@ -8,6 +8,7 @@ import ac.cord.auxiliary.compose.database.model.intermdiate.LocalQuotedNostrEven import ac.cord.auxiliary.compose.extensions.toFormattedTimeAndDateString import ac.cord.auxiliary.compose.ui.composable.widgets.content.RichContent import ac.cord.auxiliary.compose.ui.composable.widgets.profile.ProfileAvatar +import ac.cord.auxiliary.compose.ui.composable.widgets.profile.ProfileColor import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -92,11 +93,22 @@ internal fun TextNoteFeedItem( profile = profile ) - Text( - modifier = Modifier.weight(1f), - text = profile.displayName ?: profile.userName ?: nostrEvent.pubKey, - style = MaterialTheme.typography.bodyMedium - ) + Column( + modifier = Modifier.weight(1f) + ){ + Text( + text = profile.humanReadableNameOrPubkey(), + style = MaterialTheme.typography.bodyMedium + ) + + profile.staticIdentifier()?.let { staticIdentifier -> + Text( + text = staticIdentifier, + style = MaterialTheme.typography.bodySmall, + color = ProfileColor.fromProfile(profile) + ) + } + } } } else { Text(