img: only show images if it is a post from your friend

Changelog-Changed: Only show inline images from your friends
This commit is contained in:
William Casarin
2022-12-18 16:23:53 -08:00
parent caa03e336f
commit 015e0651a4
3 changed files with 11 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ struct DMView: View {
Spacer()
}
NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, show_images: true, artifacts: .just_content(event.get_content(damus_state.keypair.privkey)))
NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, show_images: should_show_images(contacts: damus_state.contacts, ev: event), artifacts: .just_content(event.get_content(damus_state.keypair.privkey)))
.foregroundColor(is_ours ? Color.white : Color.primary)
.padding(10)
.background(is_ours ? Color.accentColor : Color.secondary.opacity(0.15))