Adds history browser view
This commit is contained in:
@@ -333,6 +333,12 @@ class BrowserViewController: UIViewController
|
||||
showShareSheetForCurrentURL(fromViewController: documentControls)
|
||||
}, for: .touchUpInside)
|
||||
|
||||
// History
|
||||
documentControls.historyView.addAction(UIAction { [unowned self] action in
|
||||
documentControls.dismiss(animated: false, completion: nil)
|
||||
showHistory(action)
|
||||
}, for: .touchUpInside)
|
||||
|
||||
present(documentControls, animated: true, completion: nil)
|
||||
}), for: .touchUpInside)
|
||||
|
||||
@@ -463,6 +469,17 @@ class BrowserViewController: UIViewController
|
||||
}
|
||||
}
|
||||
|
||||
internal func showHistoryWindow() {
|
||||
let historyViewController = HistoryBrowserViewController()
|
||||
historyViewController.title = "History"
|
||||
historyViewController.navigationItem.rightBarButtonItem = UIBarButtonItem(systemItem: .done, primaryAction: UIAction { _ in
|
||||
historyViewController.dismiss(animated: true)
|
||||
})
|
||||
|
||||
let navigationController = UINavigationController(rootViewController: historyViewController)
|
||||
present(navigationController, animated: true)
|
||||
}
|
||||
|
||||
internal func updateLoadProgress(forWebView webView: WKWebView) {
|
||||
if let loadError = tab.loadError {
|
||||
toolbarController.urlBar.loadProgress = .error(error: loadError)
|
||||
|
||||
Reference in New Issue
Block a user