mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
Remove unused urlsession stuff in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
ac6e0d81f6
commit
e7a164d312
1 changed files with 1 additions and 20 deletions
|
@ -18,7 +18,7 @@ import NextcloudKit
|
|||
import NextcloudFileProviderKit
|
||||
import OSLog
|
||||
|
||||
@objc class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension, NKCommonDelegate {
|
||||
@objc class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension {
|
||||
let domain: NSFileProviderDomain
|
||||
let ncKit = NextcloudKit()
|
||||
let appGroupIdentifier = Bundle.main.object(forInfoDictionaryKey: "SocketApiPrefix") as? String
|
||||
|
@ -37,25 +37,6 @@ import OSLog
|
|||
return LocalSocketClient(socketPath: socketPath.path, lineProcessor: lineProcessor)
|
||||
}()
|
||||
|
||||
let urlSessionIdentifier = "com.nextcloud.session.upload.fileproviderext"
|
||||
let urlSessionMaximumConnectionsPerHost = 5
|
||||
lazy var urlSession: URLSession = {
|
||||
let configuration = URLSessionConfiguration.background(withIdentifier: urlSessionIdentifier)
|
||||
configuration.allowsCellularAccess = true
|
||||
configuration.sessionSendsLaunchEvents = true
|
||||
configuration.isDiscretionary = false
|
||||
configuration.httpMaximumConnectionsPerHost = urlSessionMaximumConnectionsPerHost
|
||||
configuration.requestCachePolicy = NSURLRequest.CachePolicy.reloadIgnoringLocalCacheData
|
||||
configuration.sharedContainerIdentifier = appGroupIdentifier
|
||||
|
||||
let session = URLSession(
|
||||
configuration: configuration,
|
||||
delegate: ncKitBackground,
|
||||
delegateQueue: OperationQueue.main
|
||||
)
|
||||
return session
|
||||
}()
|
||||
|
||||
// Whether or not we are going to recursively scan new folders when they are discovered.
|
||||
// Apple's recommendation is that we should always scan the file hierarchy fully.
|
||||
// This does lead to long load times when a file provider domain is initially configured.
|
||||
|
|
Loading…
Reference in a new issue