|
@@ -98,9 +98,10 @@ class NCFavorite: UIViewController, UIGestureRecognizerDelegate, NCListCellDeleg
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: k_notificationCenter_changeTheming), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(deleteFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_deleteFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(reloadDataSource), name: NSNotification.Name(rawValue: k_notificationCenter_reloadDataSource), object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(downloadFileStart(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_downloadFileStart), 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(uploadFileStart(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_uploadFileStart), object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(uploadedFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_uploadedFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(triggerProgressTask(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_progressTask), object:nil)
|
|
|
|
|
|
changeTheming()
|
|
@@ -153,6 +154,16 @@ class NCFavorite: UIViewController, UIGestureRecognizerDelegate, NCListCellDeleg
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @objc func downloadFileStart(_ notification: NSNotification) {
|
|
|
+ if self.view?.window == nil { return }
|
|
|
+
|
|
|
+ if let userInfo = notification.userInfo as NSDictionary? {
|
|
|
+ if let metadata = userInfo["metadata"] as? tableMetadata {
|
|
|
+ NCCollectionCommon.shared.notificationDownloadFileStart(collectionView: collectionView, dataSource: dataSource, metadata: metadata)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc func downloadedFile(_ notification: NSNotification) {
|
|
|
if self.view?.window == nil { return }
|
|
|
|