Ver código fonte

Remove dialog

Jonas Björkert 2 anos atrás
pai
commit
652470c618

+ 3 - 14
LoopFollow/ViewControllers/NightScoutViewController.swift

@@ -45,20 +45,9 @@ class NightscoutViewController: UIViewController {
     }
     }
     
     
     @objc func reloadWebView(_ sender: UIRefreshControl) {
     @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
     // New code to clear web cache