|
@@ -177,7 +177,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(applicationWillResignActive(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationWillResignActive), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(closeRichWorkspaceWebView), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterCloseRichWorkspaceWebView), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(changeStatusFolderE2EE(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeStatusFolderE2EE), object: nil)
|
|
|
- NotificationCenter.default.addObserver(self, selector: #selector(setNavigationItem), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterReloadAvatar), object: nil)
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(reloadAvatar(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterReloadAvatar), object: nil)
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(reloadDataSource(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterReloadDataSource), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(reloadDataSourceNetwork), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterReloadDataSourceNetwork), object: nil)
|
|
@@ -221,12 +221,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- override func viewDidAppear(_ animated: Bool) {
|
|
|
- super.viewDidAppear(animated)
|
|
|
-
|
|
|
- showTip()
|
|
|
- }
|
|
|
-
|
|
|
override func viewWillDisappear(_ animated: Bool) {
|
|
|
super.viewWillDisappear(animated)
|
|
|
|
|
@@ -329,6 +323,18 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
self.refreshControl.endRefreshing()
|
|
|
}
|
|
|
|
|
|
+ @objc func reloadAvatar(_ notification: NSNotification) {
|
|
|
+
|
|
|
+ guard let userInfo = notification.userInfo as NSDictionary?,
|
|
|
+ let error = userInfo["error"] as? NKError,
|
|
|
+ error.errorCode != NCGlobal.shared.errorNotModified else { return }
|
|
|
+
|
|
|
+ setNavigationItem()
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
|
|
+ self.showTip()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc func changeTheming() {
|
|
|
collectionView.reloadData()
|
|
|
}
|
|
@@ -617,7 +623,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
|
|
|
// MARK: - Layout
|
|
|
|
|
|
- @objc func setNavigationItem() {
|
|
|
+ func setNavigationItem() {
|
|
|
|
|
|
self.setNavigationRightItems()
|
|
|
navigationItem.title = titleCurrentFolder
|