|
@@ -136,6 +136,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: k_notificationCenter_changeTheming), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(reloadDataSource(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_reloadDataSource), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(changeStatusFolderE2EE(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_changeStatusFolderE2EE), object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(closeRichWorkspaceWebView(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_closeRichWorkspaceWebView), object: nil)
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(deleteFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_deleteFile), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(moveFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_moveFile), object: nil)
|
|
@@ -256,6 +257,12 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
reloadDataSource()
|
|
|
}
|
|
|
|
|
|
+ @objc func closeRichWorkspaceWebView(_ notification: NSNotification) {
|
|
|
+ if self.view?.window == nil { return }
|
|
|
+
|
|
|
+ reloadDataSourceNetwork()
|
|
|
+ }
|
|
|
+
|
|
|
@objc func deleteFile(_ notification: NSNotification) {
|
|
|
if self.view?.window == nil { return }
|
|
|
|
|
@@ -263,9 +270,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
if let metadata = userInfo["metadata"] as? tableMetadata, let onlyLocal = userInfo["onlyLocal"] as? Bool {
|
|
|
|
|
|
if onlyLocal {
|
|
|
- reloadDataSource()
|
|
|
+ reloadDataSource()
|
|
|
} else if metadata.fileNameView.lowercased() == k_fileNameRichWorkspace.lowercased() {
|
|
|
- self.reloadDataSourceNetwork(forced: true)
|
|
|
+ reloadDataSourceNetwork()
|
|
|
} else {
|
|
|
if let row = dataSource.deleteMetadata(ocId: metadata.ocId) {
|
|
|
let indexPath = IndexPath(row: row, section: 0)
|