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

@@ -10,7 +10,7 @@ import NaturalLanguage
struct Translated: Equatable {
let artifacts: NoteArtifacts
let artifacts: NoteArtifactsSeparated
let language: String
}
@@ -42,7 +42,7 @@ struct TranslateView: View {
.translate_button_style()
}
func TranslatedView(lang: String?, artifacts: NoteArtifacts) -> some View {
func TranslatedView(lang: String?, artifacts: NoteArtifactsSeparated) -> some View {
return VStack(alignment: .leading) {
let translatedFromLanguageString = String(format: NSLocalizedString("Translated from %@", comment: "Button to indicate that the note has been translated from a different language."), lang ?? "ja")
Text(translatedFromLanguageString)