Updated to lastest RSWeb

This commit is contained in:
Maurice Parker 2019-04-25 07:13:14 -05:00
parent cabd2b8efc
commit f3c2d8c1f8
3 changed files with 11 additions and 8 deletions

View File

@ -15,7 +15,7 @@ import Articles
final class LocalAccountRefresher {
private lazy var downloadSession: DownloadSession = {
return DownloadSession(delegate: self)
return DefaultDownloadSession(delegate: self)
}()
var progress: DownloadProgress {
@ -105,6 +105,14 @@ extension LocalAccountRefresher: DownloadSessionDelegate {
return true
}
func downloadSession(_ downloadSession: DownloadSession, didReceiveUnexpectedResponse: URLResponse, representedObject: AnyObject) {
}
func downloadSession(_ downloadSession: DownloadSession, didReceiveNotModifiedResponse: URLResponse, representedObject: AnyObject) {
}
}
// MARK: - Utility

View File

@ -17,7 +17,6 @@ var appDelegate: AppDelegate!
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate, UnreadCountProvider {
private static var urlSessionId = "com.ranchero.NetNewsWire-Evergreen"
private var backgroundUpdateTask = UIBackgroundTaskIdentifier.invalid
var window: UIWindow?
@ -45,10 +44,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil)
DownloadSession.sessionConfig = URLSessionConfiguration.background(withIdentifier: AppDelegate.urlSessionId)
DownloadSession.sessionConfig?.sessionSendsLaunchEvents = true
DownloadSession.sessionConfig?.shouldUseExtendedBackgroundIdleMode = true
// Initialize the AccountManager as soon as possible or it will cause problems
// if the application is restoring preserved state.
@ -149,7 +144,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
// We won't know when the last feed is inserted into the database or when the last unread count
// change event will come, but we do know when the url session has completed sending
var urlSessionDone = false
DownloadSession.completionHandler = {
BackgroundDownloadSession.completionHandler = {
urlSessionDone = true
completionHandler()
}

@ -1 +1 @@
Subproject commit c8d303710e1baf8aa970705372b9b5a55c5e4fb8
Subproject commit a1b94ee858506af6a70b5b7fdfd9f6227b9eae45