Everything looking really clean. tested and working in dark mode as well

This commit is contained in:
Sam DuBois
2022-12-18 22:00:48 -07:00
11 changed files with 89 additions and 18 deletions

View File

@@ -137,7 +137,7 @@ struct EventView: View {
.frame(maxWidth: .infinity, alignment: .leading)
}
NoteContentView(privkey: damus.keypair.privkey, event: event, profiles: damus.profiles, show_images: true, artifacts: .just_content(content))
NoteContentView(privkey: damus.keypair.privkey, event: event, profiles: damus.profiles, show_images: should_show_images(contacts: damus.contacts, ev: event), artifacts: .just_content(content))
.frame(maxWidth: .infinity, alignment: .leading)
if has_action_bar {
@@ -159,6 +159,14 @@ struct EventView: View {
}
}
// blame the porn bots for this code
func should_show_images(contacts: Contacts, ev: NostrEvent) -> Bool {
if contacts.is_friend(ev.pubkey) {
return true
}
return false
}
func event_validity_color(_ validation: ValidationResult) -> some View {
Group {
switch validation {