Skip to content

Commit 652470c

Browse files
committed
Remove dialog
1 parent 1f320e7 commit 652470c

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

LoopFollow/ViewControllers/NightScoutViewController.swift

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,9 @@ class NightscoutViewController: UIViewController {
4545
}
4646

4747
@objc func reloadWebView(_ sender: UIRefreshControl) {
48-
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)
49-
50-
alertController.addAction(UIAlertAction(title: "Yes", style: .destructive) { _ in
51-
self.clearWebCache()
52-
self.webView.reload()
53-
sender.endRefreshing()
54-
})
55-
56-
alertController.addAction(UIAlertAction(title: "No", style: .cancel) { _ in
57-
self.webView.reload()
58-
sender.endRefreshing()
59-
})
60-
61-
present(alertController, animated: true, completion: nil)
48+
self.clearWebCache()
49+
self.webView.reload()
50+
sender.endRefreshing()
6251
}
6352

6453
// New code to clear web cache

0 commit comments

Comments
 (0)