Revert "Fix images layout"

This reverts commit ee6e2370d2.
This commit is contained in:
Arkadiusz Fal
2022-09-11 21:21:50 +02:00
parent 6ec59cf442
commit b320ffb540
5 changed files with 80 additions and 79 deletions

View File

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

View File

@@ -38,26 +38,23 @@ struct ChannelPlaylistCell: View {
}
.foregroundColor(.secondary)
Group {
if #available(iOS 15, macOS 12, *) {
CachedAsyncImage(url: playlist.thumbnailURL) { image in
image
.resizable()
} placeholder: {
Rectangle().foregroundColor(Color("PlaceholderColor"))
}
} else {
WebImage(url: playlist.thumbnailURL)
if #available(iOS 15, macOS 12, *) {
CachedAsyncImage(url: playlist.thumbnailURL) { image in
image
.resizable()
.placeholder {
Rectangle().fill(Color("PlaceholderColor"))
}
.indicator(.activity)
} placeholder: {
Rectangle().foregroundColor(Color("PlaceholderColor"))
}
} else {
WebImage(url: playlist.thumbnailURL)
.resizable()
.placeholder {
Rectangle().fill(Color("PlaceholderColor"))
}
.indicator(.activity)
.frame(width: 165, height: 88)
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.frame(width: 165, height: 88)
.clipShape(RoundedRectangle(cornerRadius: 10))
Group {
DetailBadge(text: playlist.title, style: .prominent)
.lineLimit(2)