File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public struct NSAsyncIcon: View {
125
125
let data = try await URLSession . shared. data ( from: url) . 0
126
126
guard let json = try JSONSerialization . jsonObject ( with: data, options: [ ] ) as? [ String : Any ] ,
127
127
let results = json [ " results " ] as? [ [ String : Any ] ] ,
128
- let appIconUrl = results. first ? [ " artworkUrl512 " ] as? String
128
+ let appIconUrl = results. first ? [ " artworkUrl512 " ] as? String
129
129
else { return nil }
130
130
let resultUrl = URL ( string: appIconUrl. replacing ( " 512x512bb " , with: " 1024x1024bb " ) )
131
131
return resultUrl
@@ -136,7 +136,7 @@ public struct NSAsyncIcon: View {
136
136
do {
137
137
let imageData = try await URLSession . shared. data ( from: url) . 0
138
138
guard let imageSource = CGImageSourceCreateWithData ( imageData as CFData , nil ) ,
139
- let cgImage = CGImageSourceCreateImageAtIndex ( imageSource, 0 , nil )
139
+ let cgImage = CGImageSourceCreateImageAtIndex ( imageSource, 0 , nil )
140
140
else { return nil }
141
141
return cgImage
142
142
} catch { return nil }
You can’t perform that action at this time.
0 commit comments