mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-25 21:05:09 -04:00
article thumb data path
This commit is contained in:
parent
79eabd2e90
commit
31aa28e2c3
@ -45,7 +45,7 @@ extension MainController: UIWebViewDelegate, SFSafariViewControllerDelegate, LPT
|
||||
guard let url = webView.request?.URL,
|
||||
let article = Article.addOrUpdate(url: url, context: NSManagedObjectContext.mainQueueContext) else {return}
|
||||
article.title = JSInjection.getTitle(from: webView)
|
||||
article.thumbImageURL = URLResponseCache.shared.firstImage()?.absoluteString
|
||||
article.thumbImageURL = URLResponseCache.shared.firstImage()?.path
|
||||
self.article = article
|
||||
|
||||
// UI Updates
|
||||
|
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.1476</string>
|
||||
<string>1.8.1479</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.1480</string>
|
||||
<string>1.8.1483</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionMainStoryboard</key>
|
||||
|
@ -51,8 +51,8 @@ class Article: NSManagedObject {
|
||||
}
|
||||
|
||||
var thumbImageData: NSData? {
|
||||
if let urlString = thumbImageURL,
|
||||
let url = NSURL(string: urlString),
|
||||
if let bookID = book?.id, let path = thumbImageURL,
|
||||
let url = NSURL(bookID: bookID, contentPath: path),
|
||||
let data = NSData(contentsOfURL: url) {
|
||||
return data
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user