perf: cache link previews

Changelog-Added: Cache link previews
This commit is contained in:
William Casarin
2023-01-02 15:18:42 -08:00
parent b42f0ec5eb
commit 7372c4847d
11 changed files with 38 additions and 16 deletions

View File

@@ -249,7 +249,7 @@ struct EventView: View {
let should_show_img = should_show_images(contacts: damus.contacts, ev: event, our_pubkey: damus.pubkey)
NoteContentView(privkey: damus.keypair.privkey, event: event, profiles: damus.profiles, show_images: should_show_img, artifacts: .just_content(content), size: self.size)
NoteContentView(privkey: damus.keypair.privkey, event: event, profiles: damus.profiles, previews: damus.previews, show_images: should_show_img, artifacts: .just_content(content), size: self.size)
.frame(maxWidth: .infinity, alignment: .leading)
.allowsHitTesting(!embedded)