artifacts: allow unseparated note artifacts

This is needed for longform events. Right now we treat unseparated note
artifacts as a list of blocks, but we will likely need to render these
blocks into lists of attributed texts with image blocks inbetween.
This commit is contained in:
William Casarin
2023-06-04 15:42:32 -07:00
parent 4d995fd04c
commit 374610a21a
17 changed files with 378 additions and 121 deletions

View File

@@ -23,6 +23,14 @@ struct EventBody: View {
}
var body: some View {
if event.known_kind == .longform {
let longform = LongformEvent.parse(from: event)
Text(longform.title ?? "Untitled")
.font(.title)
.padding(.horizontal)
}
NoteContentView(damus_state: damus_state, event: event, show_images: should_show_img, size: size, options: options)
.frame(maxWidth: .infinity, alignment: .leading)
}