Imrpove note preview on list

This commit is contained in:
Kgothatso Ngako
2026-05-02 23:22:49 +02:00
parent 8b20f71a66
commit a265d03800
2 changed files with 19 additions and 6 deletions

View File

@@ -131,7 +131,8 @@ private fun EventListViewPreview() {
profile = Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk"
displayName = "Frank Talk",
nip05 = "frank@talk.at"
),
).ListView(
onNavigateToEvent = {}

View File

@@ -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(