|
@@ -118,6 +118,7 @@ class NCViewerMediaPage: UIViewController {
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(deleteFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDeleteFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(renameFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterRenameFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(moveFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterMoveFile), object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(copyFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterCopyFile), object: nil)
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(downloadedFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDownloadedFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(triggerProgressTask(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object: nil)
|
|
@@ -144,6 +145,7 @@ class NCViewerMediaPage: UIViewController {
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDeleteFile), object: nil)
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterRenameFile), object: nil)
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterMoveFile), object: nil)
|
|
|
+ NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterCopyFile), object: nil)
|
|
|
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDownloadedFile), object: nil)
|
|
|
NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object: nil)
|
|
@@ -386,6 +388,15 @@ class NCViewerMediaPage: UIViewController {
|
|
|
deleteFile(notification)
|
|
|
}
|
|
|
|
|
|
+ @objc func copyFile(_ notification: NSNotification) {
|
|
|
+
|
|
|
+ guard let userInfo = notification.userInfo as NSDictionary? else { return }
|
|
|
+
|
|
|
+ if let hud = userInfo["hud"] as? JGProgressHUD {
|
|
|
+ hud.dismiss()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc func renameFile(_ notification: NSNotification) {
|
|
|
|
|
|
guard let userInfo = notification.userInfo as NSDictionary?,
|