Add remote image loading policy settings

Changelog-Added: Ability to change remote image loading policy
This commit is contained in:
radixrat
2023-02-02 13:53:57 -08:00
committed by William Casarin
17 changed files with 104 additions and 32 deletions

View File

@@ -121,7 +121,8 @@ struct TranslateView: View {
if let translated = translated_note {
// Render translated note.
let blocks = event.get_blocks(content: translated)
translated_artifacts = render_blocks(blocks: blocks, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey)
let show_images = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey)
translated_artifacts = render_blocks(blocks: blocks, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey, show_images: show_images)
}
checkingTranslationStatus = false

View File

@@ -17,7 +17,7 @@ struct UserView: View {
let pv = ProfileView(damus_state: damus_state, profile: pmodel, followers: followers)
NavigationLink(destination: pv) {
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles, contacts: damus_state.contacts)
VStack(alignment: .leading) {
let profile = damus_state.profiles.lookup(id: pubkey)