Configured colours and added additional images to ready app for iOS 13 dark mode

This commit is contained in:
Deniz Duezgoeren
2019-10-08 21:37:42 +02:00
parent b7bc097664
commit 85efe3955d
310 changed files with 6512 additions and 4492 deletions
+3
View File
@@ -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)
}
+13 -2
View File
@@ -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,
+8 -2
View File
@@ -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())
}
}