Better image previews when saving from URL

This commit is contained in:
Jackson Harper 2022-06-02 16:25:27 -07:00
parent 5547a7bb6e
commit b736bc721a
2 changed files with 3 additions and 6 deletions

View file

@ -51,13 +51,13 @@ class ExtensionSaveService {
shareExtensionViewModel.url = hostname
case .none:
shareExtensionViewModel.url = hostname
shareExtensionViewModel.title = "Saving: " + payload.url
shareExtensionViewModel.title = payload.url
if var url = url {
url.path = "/favicon.ico"
shareExtensionViewModel.iconURL = url.url?.absoluteString
}
case let .pdf(localUrl: _):
shareExtensionViewModel.title = "Saving: " + payload.url
shareExtensionViewModel.title = payload.url
shareExtensionViewModel.url = hostname
}
}

View file

@ -197,13 +197,10 @@ public struct ShareExtensionChildView: View {
.aspectRatio(contentMode: .fill)
.frame(width: 61, height: 61)
.clipped()
} else if case AsyncImageStatus.loading = imageStatus {
} else {
Color.appButtonBackground
.aspectRatio(contentMode: .fill)
.frame(width: 61, height: 61)
} else {
EmptyView()
.frame(width: 61, height: 61)
}
}
} else {