Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarino Faggiana <marino@marinofaggiana.com>2022-09-15 19:14:02 +0300
committerMarino Faggiana <marino@marinofaggiana.com>2022-09-15 19:14:02 +0300
commita49e774d7a67083cb7678a9c82777d6ae6152d45 (patch)
tree026c751e3d304fa620b193354b59e2f8564ceb3b
parentb015abb98cd97f5c6a6387b268898d09d1eb2cac (diff)
remove the DispatchQueue.global(qos: .background).asyncfix/gui
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
-rw-r--r--iOSClient/Networking/NCAutoUpload.swift2
-rw-r--r--iOSClient/Networking/NCNetworkingChunkedUpload.swift2
-rw-r--r--iOSClient/Networking/NCNetworkingProcessUpload.swift2
-rw-r--r--iOSClient/Utility/NCUtility.swift2
-rw-r--r--iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift2
5 files changed, 5 insertions, 5 deletions
diff --git a/iOSClient/Networking/NCAutoUpload.swift b/iOSClient/Networking/NCAutoUpload.swift
index 4d6423330..4e2e47471 100644
--- a/iOSClient/Networking/NCAutoUpload.swift
+++ b/iOSClient/Networking/NCAutoUpload.swift
@@ -79,7 +79,7 @@ class NCAutoUpload: NSObject {
return
}
- DispatchQueue.global(qos: .background).async {
+ DispatchQueue.global().async {
let autoUploadPath = NCManageDatabase.shared.getAccountAutoUploadPath(urlBase: account.urlBase, account: account.account)
var metadatas: [tableMetadata] = []
diff --git a/iOSClient/Networking/NCNetworkingChunkedUpload.swift b/iOSClient/Networking/NCNetworkingChunkedUpload.swift
index a3b05113f..165079da8 100644
--- a/iOSClient/Networking/NCNetworkingChunkedUpload.swift
+++ b/iOSClient/Networking/NCNetworkingChunkedUpload.swift
@@ -151,7 +151,7 @@ extension NCNetworking {
let ASSEMBLE_TIME_MAX: Double = 30 * 60 // 30 min
let timeout = max(ASSEMBLE_TIME_MIN, min(ASSEMBLE_TIME_PER_GB * fileSizeInGB, ASSEMBLE_TIME_MAX))
- let options = NKRequestOptions(customHeader: customHeader, timeout: timeout, queue: DispatchQueue.global(qos: .background))
+ let options = NKRequestOptions(customHeader: customHeader, timeout: timeout, queue: DispatchQueue.global())
NextcloudKit.shared.moveFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: true, options: options) { _, error in
diff --git a/iOSClient/Networking/NCNetworkingProcessUpload.swift b/iOSClient/Networking/NCNetworkingProcessUpload.swift
index 412dbc0ff..ee33f5393 100644
--- a/iOSClient/Networking/NCNetworkingProcessUpload.swift
+++ b/iOSClient/Networking/NCNetworkingProcessUpload.swift
@@ -70,7 +70,7 @@ class NCNetworkingProcessUpload: NSObject {
let counterBadge = NCManageDatabase.shared.getMetadatas(predicate: NSPredicate(format: "status == %d OR status == %d OR status == %d", NCGlobal.shared.metadataStatusWaitUpload, NCGlobal.shared.metadataStatusInUpload, NCGlobal.shared.metadataStatusUploading))
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterUpdateBadgeNumber, userInfo: ["counter":counterBadge.count])
- NCNetworking.shared.getOcIdInBackgroundSession(queue: DispatchQueue.global(qos: .background), completion: { listOcId in
+ NCNetworking.shared.getOcIdInBackgroundSession(queue: DispatchQueue.global(), completion: { listOcId in
for sessionSelector in sessionSelectors {
if counterUpload < self.maxConcurrentOperationUpload {
diff --git a/iOSClient/Utility/NCUtility.swift b/iOSClient/Utility/NCUtility.swift
index 68886d5ff..bda6eadcc 100644
--- a/iOSClient/Utility/NCUtility.swift
+++ b/iOSClient/Utility/NCUtility.swift
@@ -595,7 +595,7 @@ class NCUtility: NSObject {
}
func imageFromVideo(url: URL, at time: TimeInterval, completion: @escaping (UIImage?) -> Void) {
- DispatchQueue.global(qos: .background).async {
+ DispatchQueue.global().async {
let asset = AVURLAsset(url: url)
let assetIG = AVAssetImageGenerator(asset: asset)
diff --git a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift
index 8e18d16d0..fa345fa50 100644
--- a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift
+++ b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift
@@ -156,7 +156,7 @@ extension NCPlayer {
}
func loadText(filePath: URL, _ completion: @escaping (_ contents: String?) -> Void) {
- DispatchQueue.global(qos: .background).async {
+ DispatchQueue.global().async {
guard let data = try? Data(contentsOf: filePath),
let encoding = NCUtility.shared.getEncondingDataType(data: data) else {
return