Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ private struct CommentHeaderView: View {
@State var showsDisclosureIndicator = true

var body: some View {
if #available(iOS 15.0, *) {
// Material ShapeStyles are only available from iOS 15.0.
content.background(.ultraThinMaterial)
} else {
ZStack {
VisualEffectView(effect: UIBlurEffect(style: .systemUltraThinMaterial))
content
}
}
}

var content: some View {
HStack {
text
Spacer()
Expand All @@ -116,6 +104,7 @@ private struct CommentHeaderView: View {
}
}
.padding(EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 16))
.background(.ultraThinMaterial)
}

var text: some View {
Expand All @@ -139,17 +128,3 @@ private struct CommentHeaderView: View {
.imageScale(.large)
}
}

// MARK: SwiftUI VisualEffect support for iOS 14

private struct VisualEffectView: UIViewRepresentable {
var effect: UIVisualEffect

func makeUIView(context: Context) -> UIVisualEffectView {
return UIVisualEffectView()
}

func updateUIView(_ uiView: UIVisualEffectView, context: Context) {
uiView.effect = effect
}
}