Merge pull request #3621 from stuartbreckenridge/ios-candidate

switches URL to `fileURLWithPath`
This commit is contained in:
Brent Simmons 2022-07-09 10:52:58 -07:00 committed by GitHub
commit ad51c2c5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ struct ArticleItemView: View {
func thumbnail(from path: String?) -> Image? {
guard let imagePath = path,
let url = URL(string: imagePath),
let url = URL(fileURLWithPath: imagePath),
let data = try? Data(contentsOf: url),
let uiImage = UIImage(data: data) else {
return Image(uiImage: UIImage(systemName: "globe")!)