|
@@ -33,7 +33,7 @@ class CCNotification: UITableViewController, OCNetworkingDelegate {
|
|
|
super.viewDidLoad()
|
|
|
|
|
|
self.navigationController?.navigationBar.topItem?.title = NSLocalizedString("_notification_", comment: "")
|
|
|
- self.navigationItem.setRightBarButton(UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(close)), animated: true)
|
|
|
+ self.navigationItem.setRightBarButton(UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(viewClose)), animated: true)
|
|
|
|
|
|
self.tableView.separatorColor = UIColor(colorLiteralRed: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 0.2)
|
|
|
|
|
@@ -45,13 +45,15 @@ class CCNotification: UITableViewController, OCNetworkingDelegate {
|
|
|
}
|
|
|
|
|
|
|
|
|
- func close() {
|
|
|
+ func viewClose() {
|
|
|
|
|
|
self.dismiss(animated: true) {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
func getSataSourceAt(indexPath: IndexPath) -> OCNotifications {
|
|
|
|
|
|
let idsNotification: [String] = appDelegate.listOfNotifications.allKeys as! [String]
|
|
@@ -188,6 +190,10 @@ class CCNotification: UITableViewController, OCNetworkingDelegate {
|
|
|
appDelegate.listOfNotifications.removeObject(forKey: metadataNet.identifier)
|
|
|
|
|
|
self.tableView.reloadData()
|
|
|
+
|
|
|
+ if appDelegate.listOfNotifications.count == 0 {
|
|
|
+ viewClose()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|