mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use cached PDFs if available
This commit is contained in:
parent
5537766a45
commit
ce040b8983
1 changed files with 3 additions and 0 deletions
|
|
@ -90,6 +90,9 @@ public final class PDFViewerViewModel: ObservableObject {
|
|||
|
||||
public func downloadPDF(dataService: DataService) async -> URL? {
|
||||
do {
|
||||
if itemDownloaded {
|
||||
return pdfItem.localPdfURL
|
||||
}
|
||||
if let localURL = try await dataService.fetchPDFData(slug: pdfItem.slug, pageURLString: pdfItem.originalArticleURL) {
|
||||
return localURL
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue