mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Use WebImage fix
This commit is contained in:
@@ -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)
|
||||
|
||||
|
@@ -37,23 +37,14 @@ struct ChannelPlaylistCell: View {
|
||||
}
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
if #available(iOS 15, macOS 12, *) {
|
||||
AsyncImage(url: playlist.thumbnailURL) { image in
|
||||
image
|
||||
.resizable()
|
||||
} placeholder: {
|
||||
Rectangle().foregroundColor(Color("PlaceholderColor"))
|
||||
WebImage(url: playlist.thumbnailURL)
|
||||
.resizable()
|
||||
.placeholder {
|
||||
Rectangle().fill(Color("PlaceholderColor"))
|
||||
}
|
||||
} else {
|
||||
WebImage(url: playlist.thumbnailURL)
|
||||
.resizable()
|
||||
.placeholder {
|
||||
Rectangle().fill(Color("PlaceholderColor"))
|
||||
}
|
||||
.indicator(.activity)
|
||||
.frame(width: 165, height: 88)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
}
|
||||
.indicator(.activity)
|
||||
.frame(width: 165, height: 88)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
Group {
|
||||
DetailBadge(text: playlist.title, style: .prominent)
|
||||
.lineLimit(2)
|
||||
|
@@ -271,22 +271,13 @@ struct ControlsBar: View {
|
||||
private var authorAvatar: some View {
|
||||
Group {
|
||||
if let video = model.currentItem?.video, let url = video.channel.thumbnailURL {
|
||||
if #available(iOS 15, macOS 12, *) {
|
||||
AsyncImage(url: url) { image in
|
||||
image
|
||||
.resizable()
|
||||
} placeholder: {
|
||||
Rectangle().foregroundColor(Color("PlaceholderColor"))
|
||||
WebImage(url: url)
|
||||
.resizable()
|
||||
.placeholder {
|
||||
Rectangle().fill(Color("PlaceholderColor"))
|
||||
}
|
||||
} else {
|
||||
WebImage(url: url)
|
||||
.resizable()
|
||||
.placeholder {
|
||||
Rectangle().fill(Color("PlaceholderColor"))
|
||||
}
|
||||
.retryOnAppear(true)
|
||||
.indicator(.activity)
|
||||
}
|
||||
.retryOnAppear(true)
|
||||
.indicator(.activity)
|
||||
} else {
|
||||
ZStack {
|
||||
Color(white: 0.6)
|
||||
|
Reference in New Issue
Block a user