|
@@ -65,7 +65,7 @@ import Alamofire
|
|
lastReachability = false
|
|
lastReachability = false
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: k_notificationCenter_setTitleMain), object: nil, userInfo: nil)
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_setTitleMain)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
@@ -179,7 +179,7 @@ import Alamofire
|
|
|
|
|
|
NCManageDatabase.sharedInstance.addMetadata(metadata)
|
|
NCManageDatabase.sharedInstance.addMetadata(metadata)
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -205,11 +205,11 @@ import Alamofire
|
|
metadata.status = Int(k_metadataStatusDownloading)
|
|
metadata.status = Int(k_metadataStatusDownloading)
|
|
if let result = NCManageDatabase.sharedInstance.addMetadata(metadata) { metadata = result }
|
|
if let result = NCManageDatabase.sharedInstance.addMetadata(metadata) { metadata = result }
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_downloadFileStart), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":serverUrl, "account":metadata.account])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_downloadFileStart, userInfo: ["ocId":metadata.ocId, "serverUrl":serverUrl, "account":metadata.account])
|
|
|
|
|
|
}, progressHandler: { (progress) in
|
|
}, progressHandler: { (progress) in
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_progressTask), object: nil, userInfo: ["account":metadata.account, "ocId":metadata.ocId, "serverUrl":serverUrl, "status":NSNumber(value: k_metadataStatusInDownload), "progress":NSNumber(value: progress.fractionCompleted), "totalBytes":NSNumber(value: progress.totalUnitCount), "totalBytesExpected":NSNumber(value: progress.completedUnitCount)])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_progressTask, object: nil, userInfo: ["account":metadata.account, "ocId":metadata.ocId, "serverUrl":serverUrl, "status":NSNumber(value: k_metadataStatusInDownload), "progress":NSNumber(value: progress.fractionCompleted), "totalBytes":NSNumber(value: progress.totalUnitCount), "totalBytesExpected":NSNumber(value: progress.completedUnitCount)])
|
|
|
|
|
|
}) { (account, etag, date, length, error, errorCode, errorDescription) in
|
|
}) { (account, etag, date, length, error, errorCode, errorDescription) in
|
|
|
|
|
|
@@ -235,7 +235,7 @@ import Alamofire
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_downloadedFile), object: nil, userInfo: ["metadata":metadata, "selector":selector, "errorCode":errorCode, "errorDescription":errorDescription])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_downloadedFile, userInfo: ["metadata":metadata, "selector":selector, "errorCode":errorCode, "errorDescription":errorDescription])
|
|
|
|
|
|
} else if error?.isExplicitlyCancelledError ?? false {
|
|
} else if error?.isExplicitlyCancelledError ?? false {
|
|
|
|
|
|
@@ -261,10 +261,10 @@ import Alamofire
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_downloadedFile), object: nil, userInfo: ["metadata":metadata, "selector":selector, "errorCode":errorCode, "errorDescription":errorDescription])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_downloadedFile, userInfo: ["metadata":metadata, "selector":selector, "errorCode":errorCode, "errorDescription":errorDescription])
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
completion(errorCode)
|
|
completion(errorCode)
|
|
}
|
|
}
|
|
@@ -282,7 +282,7 @@ import Alamofire
|
|
CCUtility.removeFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId))
|
|
CCUtility.removeFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId))
|
|
NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
|
|
NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -294,7 +294,7 @@ import Alamofire
|
|
var fileNameLocalPath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)!
|
|
var fileNameLocalPath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)!
|
|
|
|
|
|
guard let account = NCManageDatabase.sharedInstance.getAccount(predicate: NSPredicate(format: "account == %@", metadata.account)) else {
|
|
guard let account = NCManageDatabase.sharedInstance.getAccount(predicate: NSPredicate(format: "account == %@", metadata.account)) else {
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_uploadedFile), object: nil, userInfo: ["metadata":metadata, "errorCode":k_CCErrorInternalError, "errorDescription":"Internal error"])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_uploadedFile, userInfo: ["metadata":metadata, "errorCode":k_CCErrorInternalError, "errorDescription":"Internal error"])
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -316,7 +316,7 @@ import Alamofire
|
|
metadata.size = NCUtilityFileSystem.shared.getFileSize(filePath: fileNameLocalPath)
|
|
metadata.size = NCUtilityFileSystem.shared.getFileSize(filePath: fileNameLocalPath)
|
|
|
|
|
|
if metadata.size > Double(k_max_filesize_E2EE) {
|
|
if metadata.size > Double(k_max_filesize_E2EE) {
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_uploadedFile), object: nil, userInfo: ["metadata":metadata, "errorCode":k_CCErrorInternalError, "errorDescription":"E2E Error file too big"])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_uploadedFile, userInfo: ["metadata":metadata, "errorCode":k_CCErrorInternalError, "errorDescription":"E2E Error file too big"])
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -343,7 +343,7 @@ import Alamofire
|
|
CCUtility.moveFile(atPath: fileNamePath, toPath: fileNameLocalPath)
|
|
CCUtility.moveFile(atPath: fileNamePath, toPath: fileNameLocalPath)
|
|
|
|
|
|
if e2eEncrypted && (extractMetadata.size > Double(k_max_filesize_E2EE)) {
|
|
if e2eEncrypted && (extractMetadata.size > Double(k_max_filesize_E2EE)) {
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_uploadedFile), object: nil, userInfo: ["metadata":metadata, "errorCode":k_CCErrorInternalError, "errorDescription":"E2E Error file too big"])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_uploadedFile, userInfo: ["metadata":metadata, "errorCode":k_CCErrorInternalError, "errorDescription":"E2E Error file too big"])
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -383,8 +383,8 @@ import Alamofire
|
|
CCGraphics.createNewImage(from: metadata.fileNameView, ocId: metadata.ocId, typeFile: metadata.typeFile)
|
|
CCGraphics.createNewImage(from: metadata.fileNameView, ocId: metadata.ocId, typeFile: metadata.typeFile)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_uploadFileStart), object: nil, userInfo: ["ocId":metadata.ocId, "task":task, "serverUrl":metadata.serverUrl, "account":metadata.account])
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_uploadFileStart, userInfo: ["ocId":metadata.ocId, "task":task, "serverUrl":metadata.serverUrl, "account":metadata.account])
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -393,7 +393,7 @@ import Alamofire
|
|
|
|
|
|
if let metadata = NCManageDatabase.sharedInstance.getMetadataInSessionFromFileName(fileName, serverUrl: serverUrl, taskIdentifier: task.taskIdentifier) {
|
|
if let metadata = NCManageDatabase.sharedInstance.getMetadataInSessionFromFileName(fileName, serverUrl: serverUrl, taskIdentifier: task.taskIdentifier) {
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_progressTask), object: nil, userInfo: ["account":metadata.account, "ocId":metadata.ocId, "serverUrl":serverUrl, "status":NSNumber(value: k_metadataStatusInUpload), "progress":NSNumber(value: progress), "totalBytes":NSNumber(value: totalBytes), "totalBytesExpected":NSNumber(value: totalBytesExpected)])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_progressTask, userInfo: ["account":metadata.account, "ocId":metadata.ocId, "serverUrl":serverUrl, "status":NSNumber(value: k_metadataStatusInUpload), "progress":NSNumber(value: progress), "totalBytes":NSNumber(value: totalBytes), "totalBytesExpected":NSNumber(value: totalBytesExpected)])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -436,7 +436,7 @@ import Alamofire
|
|
}
|
|
}
|
|
|
|
|
|
#if !EXTENSION
|
|
#if !EXTENSION
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_uploadedFile), object: nil, userInfo: ["metadata":metadata, "errorCode":errorCode, "errorDescription":""])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_uploadedFile, userInfo: ["metadata":metadata, "errorCode":errorCode, "errorDescription":""])
|
|
#endif
|
|
#endif
|
|
|
|
|
|
} else if errorCode == NSURLErrorCancelled {
|
|
} else if errorCode == NSURLErrorCancelled {
|
|
@@ -480,12 +480,12 @@ import Alamofire
|
|
metadata.sessionTaskIdentifier = 0
|
|
metadata.sessionTaskIdentifier = 0
|
|
metadata.status = Int(k_metadataStatusUploadError)
|
|
metadata.status = Int(k_metadataStatusUploadError)
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_uploadedFile), object: nil, userInfo: ["metadata":metadata, "errorCode":errorCode, "errorDescription":errorDescription])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_uploadedFile, userInfo: ["metadata":metadata, "errorCode":errorCode, "errorDescription":errorDescription])
|
|
|
|
|
|
if let result = NCManageDatabase.sharedInstance.addMetadata(metadata) { metadata = result }
|
|
if let result = NCManageDatabase.sharedInstance.addMetadata(metadata) { metadata = result }
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -506,7 +506,7 @@ import Alamofire
|
|
metadata.status = Int(k_metadataStatusNormal)
|
|
metadata.status = Int(k_metadataStatusNormal)
|
|
NCManageDatabase.sharedInstance.addMetadata(metadata)
|
|
NCManageDatabase.sharedInstance.addMetadata(metadata)
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -520,7 +520,7 @@ import Alamofire
|
|
CCUtility.removeFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId))
|
|
CCUtility.removeFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId))
|
|
NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
|
|
NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -623,7 +623,7 @@ import Alamofire
|
|
NCManageDatabase.sharedInstance.addMetadatas(metadatasInUpload!)
|
|
NCManageDatabase.sharedInstance.addMetadatas(metadatasInUpload!)
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":serverUrl])
|
|
|
|
|
|
completion(account, metadataFolderInserted, metadatasInserted, errorCode, "")
|
|
completion(account, metadataFolderInserted, metadatasInserted, errorCode, "")
|
|
}
|
|
}
|
|
@@ -703,7 +703,7 @@ import Alamofire
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":serverUrl])
|
|
|
|
|
|
} else if errorCode == 405 && overwrite {
|
|
} else if errorCode == 405 && overwrite {
|
|
self.NotificationPost(name: k_notificationCenter_createFolder, userInfo: ["fileName": fileName, "serverUrl": serverUrl, "errorCode": 0], errorDescription: "", completion: completion)
|
|
self.NotificationPost(name: k_notificationCenter_createFolder, userInfo: ["fileName": fileName, "serverUrl": serverUrl, "errorCode": 0], errorDescription: "", completion: completion)
|
|
@@ -775,7 +775,7 @@ import Alamofire
|
|
NCManageDatabase.sharedInstance.deleteDirectoryAndSubDirectory(serverUrl: CCUtility.stringAppendServerUrl(metadata.serverUrl, addFileName: metadata.fileName), account: metadata.account)
|
|
NCManageDatabase.sharedInstance.deleteDirectoryAndSubDirectory(serverUrl: CCUtility.stringAppendServerUrl(metadata.serverUrl, addFileName: metadata.fileName), account: metadata.account)
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
|
|
|
|
self.NotificationPost(name: k_notificationCenter_deleteFile, userInfo: ["metadata": metadata, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
self.NotificationPost(name: k_notificationCenter_deleteFile, userInfo: ["metadata": metadata, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
@@ -809,7 +809,7 @@ import Alamofire
|
|
if errorCode == 0 && metadata.account == account {
|
|
if errorCode == 0 && metadata.account == account {
|
|
NCManageDatabase.sharedInstance.setMetadataFavorite(ocId: metadata.ocId, favorite: favorite)
|
|
NCManageDatabase.sharedInstance.setMetadataFavorite(ocId: metadata.ocId, favorite: favorite)
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
|
|
|
|
self.NotificationPost(name: k_notificationCenter_favoriteFile, userInfo: ["metadata": metadata, "favorite": favorite, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
self.NotificationPost(name: k_notificationCenter_favoriteFile, userInfo: ["metadata": metadata, "favorite": favorite, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
@@ -904,7 +904,7 @@ import Alamofire
|
|
} catch { }
|
|
} catch { }
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["ocId":metadata.ocId, "serverUrl":metadata.serverUrl])
|
|
}
|
|
}
|
|
|
|
|
|
self.NotificationPost(name: k_notificationCenter_renameFile, userInfo: ["metadata": metadata, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
self.NotificationPost(name: k_notificationCenter_renameFile, userInfo: ["metadata": metadata, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
@@ -953,8 +953,8 @@ import Alamofire
|
|
metadataNew = metadataMove
|
|
metadataNew = metadataMove
|
|
}
|
|
}
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":metadata.serverUrl])
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":serverUrlTo])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":metadata.serverUrl])
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":serverUrlTo])
|
|
}
|
|
}
|
|
|
|
|
|
self.NotificationPost(name: k_notificationCenter_moveFile, userInfo: ["metadata": metadata, "metadataNew": metadataNew, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
self.NotificationPost(name: k_notificationCenter_moveFile, userInfo: ["metadata": metadata, "metadataNew": metadataNew, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
@@ -991,7 +991,7 @@ import Alamofire
|
|
|
|
|
|
NCCommunication.shared.copyFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: overwrite) { (account, errorCode, errorDescription) in
|
|
NCCommunication.shared.copyFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: overwrite) { (account, errorCode, errorDescription) in
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["serverUrl":serverUrlTo])
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataSource, userInfo: ["serverUrl":serverUrlTo])
|
|
|
|
|
|
self.NotificationPost(name: k_notificationCenter_copyFile, userInfo: ["metadata": metadata, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
self.NotificationPost(name: k_notificationCenter_copyFile, userInfo: ["metadata": metadata, "errorCode": errorCode], errorDescription: errorDescription, completion: completion)
|
|
}
|
|
}
|
|
@@ -1006,7 +1006,7 @@ import Alamofire
|
|
if errorDescription == nil { userInfo["errorDescription"] = "" }
|
|
if errorDescription == nil { userInfo["errorDescription"] = "" }
|
|
else { userInfo["errorDescription"] = NSLocalizedString(errorDescription as! String, comment: "") }
|
|
else { userInfo["errorDescription"] = NSLocalizedString(errorDescription as! String, comment: "") }
|
|
|
|
|
|
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: name), object: nil, userInfo: userInfo)
|
|
|
|
|
|
+ NotificationCenter.default.postOnMainThread(name: name, userInfo: userInfo)
|
|
|
|
|
|
completion(userInfo["errorCode"] as! Int, userInfo["errorDescription"] as! String)
|
|
completion(userInfo["errorCode"] as! Int, userInfo["errorDescription"] as! String)
|
|
}
|
|
}
|