Cache translations, fix translation popping

Completely refactor Translate View. Simplify bool logic into a state enum.

Changelog-Fixed: Fix translation text popping
Changelog-Added: Cache translations
This commit is contained in:
William Casarin
2023-04-06 10:16:53 -07:00
parent 95fb7bccf8
commit c5341ba337
3 changed files with 144 additions and 78 deletions
+5 -1
View File
@@ -234,7 +234,11 @@ struct NoteContentView_Previews: PreviewProvider {
}
}
struct NoteArtifacts {
struct NoteArtifacts: Equatable {
static func == (lhs: NoteArtifacts, rhs: NoteArtifacts) -> Bool {
return lhs.content == rhs.content
}
let content: AttributedString
let images: [URL]
let invoices: [Invoice]