Browse Source

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 năm trước cách đây
mục cha
commit
eed307649f
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 2 2
      iOSClient/Networking/NCService.swift
  2. 2 1
      iOSClient/Utility/NCUtility.swift

+ 2 - 2
iOSClient/Networking/NCService.swift

@@ -270,9 +270,9 @@ class NCService: NSObject {
 
     private func requestDashboardWidget() {
         
-        //let options = NKRequestOptions(queue: NKCommon.shared.backgroundQueue)
+        let options = NKRequestOptions(queue: NKCommon.shared.backgroundQueue)
 
-        NextcloudKit.shared.getDashboardWidget() { account, dashboardWidgets, data, error in
+        NextcloudKit.shared.getDashboardWidget(options: options) { account, dashboardWidgets, data, error in
             if error == .success, let dashboardWidgets = dashboardWidgets  {
                 NCManageDatabase.shared.addDasboardWidget(account: account, dashboardWidgets: dashboardWidgets)
                 for widget in dashboardWidgets {

+ 2 - 1
iOSClient/Utility/NCUtility.swift

@@ -1027,9 +1027,10 @@ class NCUtility: NSObject {
         
         let fileNamePath: String = CCUtility.getDirectoryUserData() + "/" + fileName + ".png"
         let size = CGSize(width: size, height: size)
+        let options = NKRequestOptions(queue: NKCommon.shared.backgroundQueue)
         
         if !FileManager().fileExists(atPath: fileNamePath) {
-            NextcloudKit.shared.getPreview(url: url) { account, data, error in
+            NextcloudKit.shared.getPreview(url: url, options: options) { account, data, error in
                 guard let data = data else { return completition(nil) }
                 var image: UIImage?
                 if let uiImage = UIImage(data: data) {