mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-26 05:18:31 -04:00
commit
This commit is contained in:
parent
d5066c2c8f
commit
0198551225
@ -71,6 +71,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
func applicationDidBecomeActive(application: UIApplication) {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
NSTimer.scheduledTimerWithTimeInterval(60.0, target: self, selector: #selector(AppDelegate.recordActiveSession), userInfo: nil, repeats: false)
|
||||
ZimMultiReader.shared.startScan()
|
||||
removeAllDynamicShortcutItems()
|
||||
}
|
||||
|
||||
|
@ -24,11 +24,11 @@ extension MainController: UIWebViewDelegate, SFSafariViewControllerDelegate,
|
||||
}
|
||||
|
||||
func webViewDidStartLoad(webView: UIWebView) {
|
||||
// URLResponseCache.shared.start()
|
||||
URLResponseCache.shared.start()
|
||||
}
|
||||
|
||||
func webViewDidFinishLoad(webView: UIWebView) {
|
||||
// URLResponseCache.shared.stop()
|
||||
URLResponseCache.shared.stop()
|
||||
|
||||
// Create article object
|
||||
guard let url = webView.request?.URL,
|
||||
@ -36,6 +36,9 @@ extension MainController: UIWebViewDelegate, SFSafariViewControllerDelegate,
|
||||
article.title = JSInjection.getTitle(from: webView)
|
||||
article.thumbImageURL = URLResponseCache.shared.firstImage()?.absoluteString
|
||||
self.article = article
|
||||
|
||||
// UI Updates
|
||||
configureNavigationButtonTint()
|
||||
}
|
||||
|
||||
func webView(webView: UIWebView, didFailLoadWithError error: NSError) {
|
||||
|
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.338</string>
|
||||
<string>1.8.341</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.341</string>
|
||||
<string>1.8.344</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionMainStoryboard</key>
|
||||
|
@ -50,7 +50,7 @@ class ScanLocalBookOperation: Operation {
|
||||
}
|
||||
|
||||
override func operationDidFinish(errors: [ErrorType]) {
|
||||
print("Scan finshed, lasted for \(-time.timeIntervalSinceNow)")
|
||||
print("Scan finshed, lasted for \(-time.timeIntervalSinceNow) seconds.")
|
||||
}
|
||||
|
||||
private func updateReaders() {
|
||||
|
@ -21,8 +21,6 @@ class ZimMultiReader: NSObject, DirectoryMonitorDelegate {
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
|
||||
startScan()
|
||||
monitor.delegate = self
|
||||
monitor.startMonitoring()
|
||||
}
|
||||
@ -44,7 +42,7 @@ class ZimMultiReader: NSObject, DirectoryMonitorDelegate {
|
||||
})
|
||||
})
|
||||
operation.queuePriority = .VeryHigh
|
||||
if readers.count == 0 { operation.qualityOfService = .UserInitiated }
|
||||
if readers.count == 0 { operation.qualityOfService = .UserInteractive }
|
||||
GlobalQueue.shared.add(scan: operation)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user