diff options
author | Marino Faggiana <marino@marinofaggiana.com> | 2022-11-08 13:03:03 +0300 |
---|---|---|
committer | Marino Faggiana <marino@marinofaggiana.com> | 2022-11-08 13:03:03 +0300 |
commit | c2c0dc9a69858c404a494f80aac0c10c2133d624 (patch) | |
tree | 427a3ba8a712322c8349f6559694c6ab54297bf7 | |
parent | 81db2593c8d7f617b57734d79c98442d4c14e380 (diff) |
fix gui
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
-rw-r--r-- | Widget/Dashboard/DashboardData.swift | 4 | ||||
-rw-r--r-- | Widget/Files/FilesData.swift | 4 | ||||
-rw-r--r-- | Widget/Lockscreen/LockscreenData.swift | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Widget/Dashboard/DashboardData.swift b/Widget/Dashboard/DashboardData.swift index 5a47f9bc2..52f2e2c42 100644 --- a/Widget/Dashboard/DashboardData.swift +++ b/Widget/Dashboard/DashboardData.swift @@ -140,7 +140,6 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis let (tableDashboard, tableButton) = NCManageDatabase.shared.getDashboardWidget(account: account.account, id: id) let existsButton = (tableButton?.isEmpty ?? true) ? false : true - let options = NKRequestOptions(timeout: 15, queue: NKCommon.shared.backgroundQueue) let title = tableDashboard?.title ?? id var imagetmp = UIImage(named: "widget")! @@ -151,7 +150,8 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis } } let titleImage = imagetmp - + + let options = NKRequestOptions(timeout: 90, queue: NKCommon.shared.backgroundQueue) NextcloudKit.shared.getDashboardWidgetsApplication(id, options: options) { _, results, data, error in Task { diff --git a/Widget/Files/FilesData.swift b/Widget/Files/FilesData.swift index 8ed5d33ce..a6e9b457e 100644 --- a/Widget/Files/FilesData.swift +++ b/Widget/Files/FilesData.swift @@ -197,7 +197,7 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi NKCommon.shared.writeLog("[INFO] Start \(NCBrandOptions.shared.brand) widget session with level \(levelLog) " + versionNextcloudiOS) } - let options = NKRequestOptions(timeout: 15) + let options = NKRequestOptions(timeout: 90, queue: NKCommon.shared.backgroundQueue) NextcloudKit.shared.searchBodyRequest(serverUrl: account.urlBase, requestBody: requestBody, showHiddenFiles: CCUtility.getShowHiddenFiles(), options: options) { _, files, data, error in Task { var datas: [FilesData] = [] @@ -230,7 +230,7 @@ func getFilesDataEntry(configuration: AccountIntent?, isPreview: Bool, displaySi let fileNamePathOrFileId = CCUtility.returnFileNamePath(fromFileName: file.fileName, serverUrl: file.serverUrl, urlBase: file.urlBase, userId: file.userId, account: account.account)! let fileNamePreviewLocalPath = CCUtility.getDirectoryProviderStoragePreviewOcId(file.ocId, etag: file.etag)! let fileNameIconLocalPath = CCUtility.getDirectoryProviderStorageIconOcId(file.ocId, etag: file.etag)! - let (_, _, imageIcon, _, _, _) = await NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePathOrFileId, fileNamePreviewLocalPath: fileNamePreviewLocalPath, widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon) + let (_, _, imageIcon, _, _, _) = await NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePathOrFileId, fileNamePreviewLocalPath: fileNamePreviewLocalPath, widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon, options: options) if let image = imageIcon { imageRecent = image } diff --git a/Widget/Lockscreen/LockscreenData.swift b/Widget/Lockscreen/LockscreenData.swift index c6c597140..b0a834b3f 100644 --- a/Widget/Lockscreen/LockscreenData.swift +++ b/Widget/Lockscreen/LockscreenData.swift @@ -39,7 +39,6 @@ func getLockscreenDataEntry(configuration: AccountIntent?, isPreview: Bool, fami var account: tableAccount? var quotaRelative: Float = 0 - let options = NKRequestOptions(timeout: 15, queue: NKCommon.shared.backgroundQueue) if isPreview { return completion(LockscreenData(date: Date(), isPlaceholder: true, activity: "", link: URL(string: "https://")!, quotaRelative: 0, quotaUsed: "", quotaTotal: "", error: false)) @@ -73,6 +72,7 @@ func getLockscreenDataEntry(configuration: AccountIntent?, isPreview: Bool, fami nextcloudVersion: 0, delegate: NCNetworking.shared) + let options = NKRequestOptions(timeout: 90, queue: NKCommon.shared.backgroundQueue) if #available(iOSApplicationExtension 16.0, *) { if family == .accessoryCircular { NextcloudKit.shared.getUserProfile(options: options) { _, userProfile, _, error in |