Archived
Configured colours and added additional images to ready app for iOS 13 dark mode
This commit is contained in:
@@ -159,7 +159,10 @@ open class NetworkReachabilityManager {
|
||||
let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue)
|
||||
|
||||
listenerQueue.async {
|
||||
self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30)
|
||||
|
||||
guard let flags = self.flags else { return }
|
||||
|
||||
self.notifyListener(flags)
|
||||
}
|
||||
|
||||
|
||||
Generated
+13
-2
@@ -497,8 +497,19 @@ open class DownloadRequest: Request {
|
||||
// MARK: State
|
||||
|
||||
/// Cancels the request.
|
||||
open override func cancel() {
|
||||
downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 }
|
||||
override open func cancel() {
|
||||
cancel(createResumeData: true)
|
||||
}
|
||||
|
||||
/// Cancels the request.
|
||||
///
|
||||
/// - parameter createResumeData: Determines whether resume data is created via the underlying download task or not.
|
||||
open func cancel(createResumeData: Bool) {
|
||||
if createResumeData {
|
||||
downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 }
|
||||
} else {
|
||||
downloadDelegate.downloadTask.cancel()
|
||||
}
|
||||
|
||||
NotificationCenter.default.post(
|
||||
name: Notification.Name.Task.DidCancel,
|
||||
|
||||
Generated
+8
-2
@@ -219,7 +219,10 @@ extension DataRequest {
|
||||
/// - returns: The request.
|
||||
@discardableResult
|
||||
public func validate() -> Self {
|
||||
return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes)
|
||||
let contentTypes = { [unowned self] in
|
||||
self.acceptableContentTypes
|
||||
}
|
||||
return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,6 +313,9 @@ extension DownloadRequest {
|
||||
/// - returns: The request.
|
||||
@discardableResult
|
||||
public func validate() -> Self {
|
||||
return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes)
|
||||
let contentTypes = { [unowned self] in
|
||||
self.acceptableContentTypes
|
||||
}
|
||||
return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user