|
@@ -62,9 +62,17 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
|
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
|
super.viewDidAppear(animated)
|
|
|
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(initializeMain), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitializeMain), object: nil)
|
|
|
+
|
|
|
getNetwokingNotification()
|
|
|
}
|
|
|
|
|
|
+ override func viewDidDisappear(_ animated: Bool) {
|
|
|
+ super.viewDidDisappear(animated)
|
|
|
+
|
|
|
+ NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterInitializeMain), object: nil)
|
|
|
+ }
|
|
|
+
|
|
|
@objc func changeTheming() {
|
|
|
tableView.reloadData()
|
|
|
}
|
|
@@ -73,6 +81,12 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
|
|
|
self.dismiss(animated: true, completion: nil)
|
|
|
}
|
|
|
|
|
|
+ // MARK: - NotificationCenter
|
|
|
+
|
|
|
+ @objc func initializeMain() {
|
|
|
+ getNetwokingNotification()
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: - Empty
|
|
|
|
|
|
func emptyDataSetView(_ view: NCEmptyView) {
|