Browse Source

Images: Don't show white background in dark mode and vice versa

Changelog-Fixed: Don't show white background on images in dark mode
post-button-style
William Casarin 2 years ago
parent
commit
25b233f586
  1. 3
      damus/Components/ImageCarousel.swift

3
damus/Components/ImageCarousel.swift

@ -115,6 +115,8 @@ struct ImageViewer: View {
struct ImageCarousel: View { struct ImageCarousel: View {
var urls: [URL] var urls: [URL]
@Environment(\.colorScheme) var colorScheme
@State var open_sheet: Bool = false @State var open_sheet: Bool = false
@State var current_url: URL? = nil @State var current_url: URL? = nil
@ -122,6 +124,7 @@ struct ImageCarousel: View {
TabView { TabView {
ForEach(urls, id: \.absoluteString) { url in ForEach(urls, id: \.absoluteString) { url in
Rectangle() Rectangle()
.foregroundColor(colorScheme == .light ? Color.white : Color.black)
.overlay { .overlay {
KFAnimatedImage(url) KFAnimatedImage(url)
.configure { view in .configure { view in

Loading…
Cancel
Save