Adds NIP05 to the main note in a thread
This commit is contained in:
@@ -173,7 +173,11 @@ fun NoteMaster(baseNote: Note,
|
|||||||
|
|
||||||
var showHiddenNote by remember { mutableStateOf(false) }
|
var showHiddenNote by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
if (note?.event == null) {
|
var moreActionsExpanded by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
val noteEvent = note?.event
|
||||||
|
|
||||||
|
if (noteEvent == null) {
|
||||||
BlankNote()
|
BlankNote()
|
||||||
} else if (!account.isAcceptable(noteForReports) && !showHiddenNote) {
|
} else if (!account.isAcceptable(noteForReports) && !showHiddenNote) {
|
||||||
HiddenNote(
|
HiddenNote(
|
||||||
@@ -206,15 +210,30 @@ fun NoteMaster(baseNote: Note,
|
|||||||
|
|
||||||
Column(modifier = Modifier.padding(start = 10.dp)) {
|
Column(modifier = Modifier.padding(start = 10.dp)) {
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
NoteUsernameDisplay(baseNote)
|
NoteUsernameDisplay(baseNote, Modifier.weight(1f))
|
||||||
|
|
||||||
|
Text(
|
||||||
|
timeAgo(noteEvent.createdAt),
|
||||||
|
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f),
|
||||||
|
maxLines = 1
|
||||||
|
)
|
||||||
|
|
||||||
|
IconButton(
|
||||||
|
modifier = Modifier.then(Modifier.size(24.dp)),
|
||||||
|
onClick = { moreActionsExpanded = true }
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Default.MoreVert,
|
||||||
|
null,
|
||||||
|
modifier = Modifier.size(15.dp),
|
||||||
|
tint = MaterialTheme.colors.onSurface.copy(alpha = 0.32f),
|
||||||
|
)
|
||||||
|
|
||||||
|
NoteDropDownMenu(baseNote, moreActionsExpanded, { moreActionsExpanded = false }, accountViewModel)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
ObserveDisplayNip05Status(baseNote)
|
||||||
Text(
|
|
||||||
timeAgoLong(note.event?.createdAt),
|
|
||||||
color = MaterialTheme.colors.onSurface.copy(alpha = 0.32f)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user