|
|
@@ -45,20 +45,9 @@ class NightscoutViewController: UIViewController {
|
|
|
}
|
|
|
|
|
|
@objc func reloadWebView(_ sender: UIRefreshControl) {
|
|
|
- let alertController = UIAlertController(title: "Clear Web Cache", message: "Do you want to clear the web cache?\nNote: All Nightscout settings will be reverted to defaults!", preferredStyle: .alert)
|
|
|
-
|
|
|
- alertController.addAction(UIAlertAction(title: "Yes", style: .destructive) { _ in
|
|
|
- self.clearWebCache()
|
|
|
- self.webView.reload()
|
|
|
- sender.endRefreshing()
|
|
|
- })
|
|
|
-
|
|
|
- alertController.addAction(UIAlertAction(title: "No", style: .cancel) { _ in
|
|
|
- self.webView.reload()
|
|
|
- sender.endRefreshing()
|
|
|
- })
|
|
|
-
|
|
|
- present(alertController, animated: true, completion: nil)
|
|
|
+ self.clearWebCache()
|
|
|
+ self.webView.reload()
|
|
|
+ sender.endRefreshing()
|
|
|
}
|
|
|
|
|
|
// New code to clear web cache
|