Use color.clear so placeholder images are not visible when selected

This commit is contained in:
Jackson Harper
2023-12-15 17:30:54 +08:00
parent eae08a6761
commit f392c022a4
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ public struct GridCard: View {
CachedAsyncImage(url: imageURL) { phase in
switch phase {
case .empty:
Color.systemBackground
Color.clear
.frame(maxWidth: .infinity, maxHeight: geo.size.height)
case let .success(image):
image.resizable()
@ -93,7 +93,7 @@ public struct GridCard: View {
// we need to add this currently unused fallback
// to handle any new cases that might be added
// in the future:
Color.systemBackground
Color.clear
.frame(maxWidth: .infinity, maxHeight: geo.size.height)
}
}

View File

@ -37,7 +37,7 @@ public struct LibraryFeatureCard: View {
CachedAsyncImage(url: imageURL) { phase in
switch phase {
case .empty:
Color.systemBackground
Color.clear
.frame(width: 146, height: 90)
case let .success(image):
image.resizable()

View File

@ -312,7 +312,7 @@ public struct LibraryItemCard: View {
.cornerRadius(5)
.padding(.top, 2)
} else {
Color.systemBackground
Color.clear
.frame(width: 50, height: 75)
.cornerRadius(5)
.padding(.top, 2)