mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 14:53:25 +01:00
[ADD] iOS 13 compatible AsyncImage implementation with cache
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import AsyncImage
|
||||
|
||||
struct AppIconView: View {
|
||||
let iconUrl: URL?
|
||||
@@ -16,7 +17,7 @@ struct AppIconView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if let iconUrl, #available(iOS 15.0, *) {
|
||||
if let iconUrl {
|
||||
AsyncImage(url: iconUrl) { image in
|
||||
image
|
||||
.resizable()
|
||||
@@ -25,10 +26,6 @@ struct AppIconView: View {
|
||||
}
|
||||
.frame(width: size, height: size)
|
||||
.clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous))
|
||||
} else {
|
||||
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
||||
.background(Color.secondary)
|
||||
.frame(width: size, height: size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user