Commit 1d41afe7 by Demid Merzlyakov

IOS-161: Added track when app will enter foreground to update current location access level

parent b50d56fd
...@@ -29,7 +29,11 @@ class SettingsViewController: UIViewController { ...@@ -29,7 +29,11 @@ class SettingsViewController: UIViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
NotificationCenter.default.addObserver(self,
selector: #selector(willEnterForeground),
name: UIApplication.willEnterForegroundNotification,
object: nil)
viewModel.delegate = self viewModel.delegate = self
prepareController() prepareController()
prepareTableView() prepareTableView()
...@@ -56,6 +60,12 @@ class SettingsViewController: UIViewController { ...@@ -56,6 +60,12 @@ class SettingsViewController: UIViewController {
self.coordinator.viewControllerDidEnd(controller: self) self.coordinator.viewControllerDidEnd(controller: self)
} }
} }
@objc private func willEnterForeground() {
DispatchQueue.main.async {
self.tableView.reloadData()
}
}
} }
//MARK:- Prepare //MARK:- Prepare
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment