Use WebImage fix

This commit is contained in:
Arkadiusz Fal
2022-09-11 21:33:08 +02:00
parent b94dc08b68
commit 1c926f276b
9 changed files with 97 additions and 167 deletions

View File

@@ -37,23 +37,15 @@ struct ChannelCell: View {
.opacity(0.6)
}
.foregroundColor(.secondary)
if #available(iOS 15, macOS 12, *) {
AsyncImage(url: channel.thumbnailURL) { image in
image
.resizable()
} placeholder: {
Rectangle().foregroundColor(Color("PlaceholderColor"))
WebImage(url: channel.thumbnailURL)
.resizable()
.placeholder {
Rectangle().fill(Color("PlaceholderColor"))
}
} else {
WebImage(url: channel.thumbnailURL)
.resizable()
.placeholder {
Rectangle().fill(Color("PlaceholderColor"))
}
.indicator(.activity)
.frame(width: 88, height: 88)
.clipShape(Circle())
}
.indicator(.activity)
.frame(width: 88, height: 88)
.clipShape(Circle())
DetailBadge(text: channel.name, style: .prominent)