diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2020-09-30 12:34:50 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2020-09-30 12:34:50 +0300 |
commit | e0cdaa6f0c79b4a8dac0c87e9d0bfa1a4fe2deac (patch) | |
tree | 5a9ec054ac49064ee2475b900cabc03969350f60 /iOSClient/Recent | |
parent | 0b8f00f5c2d20668446742767a00933cd5ad80ee (diff) |
coding
Diffstat (limited to 'iOSClient/Recent')
-rw-r--r-- | iOSClient/Recent/NCRecent.swift | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/iOSClient/Recent/NCRecent.swift b/iOSClient/Recent/NCRecent.swift index f17bb0e79..2c5331c8e 100644 --- a/iOSClient/Recent/NCRecent.swift +++ b/iOSClient/Recent/NCRecent.swift @@ -125,15 +125,21 @@ class NCRecent: NCCollectionViewCommon { </d:searchrequest> """ - guard var lessDate = Calendar.current.date(byAdding: .second, value: 1, to: Date()) else { return } - let lessDateString = NCCommunicationCommon.shared.convertDate( format: "yyyy-MM-dd'T'HH:mm:ssZZZZZ") - let requestBody = String(format: requestBodyRecent, "/files/"+appDelegate.userID) + let dateFormatter = DateFormatter() + dateFormatter.locale = Locale.init(identifier: "en_US_POSIX") + dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + let lessDateString = dateFormatter.string(from: Date()) + let requestBody = String(format: requestBodyRecent, "/files/"+appDelegate.userID, lessDateString) isReloadDataSourceNetworkInProgress = true collectionView?.reloadData() NCCommunication.shared.searchBodyRequest(serverUrl: appDelegate.urlBase, requestBody: requestBody, showHiddenFiles: CCUtility.getShowHiddenFiles()) { (account, files, errorCode, errorDescription) in + let directoryMetadatas = NCManageDatabase.sharedInstance.addMetadatas(files: files, account: account) + for metadata in directoryMetadatas { + } + self.refreshControl.endRefreshing() self.isReloadDataSourceNetworkInProgress = false self.reloadDataSource() |