|
@@ -60,6 +60,7 @@ class NCDetailViewController: UIViewController {
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(changeDisplayMode), name: NSNotification.Name(rawValue: k_notificationCenter_splitViewChangeDisplayMode), object: nil)
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(downloadedFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_downloadedFile), object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(uploadedFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_uploadedFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(deleteFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_deleteFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(renameFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_renameFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(moveFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_moveFile), object: nil)
|
|
@@ -333,6 +334,17 @@ class NCDetailViewController: UIViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @objc func uploadedFile(_ notification: NSNotification) {
|
|
|
+ if self.view?.window == nil { return }
|
|
|
+
|
|
|
+ if let userInfo = notification.userInfo as NSDictionary? {
|
|
|
+ if let metadata = userInfo["metadata"] as? tableMetadata, let _ = userInfo["errorCode"] as? Int {
|
|
|
+ if metadata.serverUrl != self.metadata?.serverUrl { return }
|
|
|
+ progress(0)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc func downloadImage(_ notification: NSNotification) {
|
|
|
if self.view?.window == nil { return }
|
|
|
|