From 4f86361b638513a82e90c3450c27d5ad11420733 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 13 Feb 2023 09:46:41 -0800 Subject: [PATCH] Revert "Improved blur on images, especially in dark mode" Can't open images anymore This reverts commit 47a6f7ff3809319ccb0695ad69e80ff7df641a4c. --- damus/Views/NoteContentView.swift | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/damus/Views/NoteContentView.swift b/damus/Views/NoteContentView.swift index 56a1357e..773f726e 100644 --- a/damus/Views/NoteContentView.swift +++ b/damus/Views/NoteContentView.swift @@ -9,18 +9,6 @@ import SwiftUI import LinkPresentation import NaturalLanguage -struct Blur: UIViewRepresentable { - var style: UIBlurEffect.Style = .systemUltraThinMaterial - - func makeUIView(context: Context) -> UIVisualEffectView { - return UIVisualEffectView(effect: UIBlurEffect(style: style)) - } - - func updateUIView(_ uiView: UIVisualEffectView, context: Context) { - uiView.effect = UIBlurEffect(style: style) - } -} - struct NoteContentView: View { let damus_state: DamusState let event: NostrEvent @@ -45,12 +33,13 @@ struct NoteContentView: View { if show_images && artifacts.images.count > 0 { ImageCarousel(urls: artifacts.images) } else if !show_images && artifacts.images.count > 0 { - ZStack { - ImageCarousel(urls: artifacts.images) - .blur(radius: 10, opaque: true) - Blur() - } - .cornerRadius(10) + ImageCarousel(urls: artifacts.images) + .blur(radius: 10) + .overlay { + Rectangle() + .opacity(0.50) + } + .cornerRadius(10) } if artifacts.invoices.count > 0 { InvoicesView(our_pubkey: damus_state.keypair.pubkey, invoices: artifacts.invoices)