Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kofigumbs committed Jun 4, 2022
1 parent f868b31 commit 9738e89
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions Sources/Runtime/Tab+WKNavigationDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ extension Tab: WKNavigationDelegate {

func webView(_: WKWebView, decidePolicyFor: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) -> () {
switch decidePolicyFor.targetFrame {
case .some(_):
decisionHandler(.allow)
case .none:
decisionHandler(.cancel)
_ = decidePolicyFor.request.url.map(Browser.global.open)
case .some(_):
decisionHandler(.allow)
case .none:
decisionHandler(.cancel)
_ = decidePolicyFor.request.url.map(Browser.global.open)
}
}

func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
switch challenge.protectionSpace.authenticationMethod {
case NSURLAuthenticationMethodHTTPBasic:
completionHandler(.useCredential, URLCredential(user: self.basicAuthUser, password: self.basicAuthPassword, persistence: .forSession))
default:
completionHandler(.performDefaultHandling, nil)
case NSURLAuthenticationMethodHTTPBasic:
completionHandler(.useCredential, URLCredential(user: self.basicAuthUser, password: self.basicAuthPassword, persistence: .forSession))
default:
completionHandler(.performDefaultHandling, nil)
}
}
}
4 changes: 2 additions & 2 deletions Sources/Runtime/WKWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ extension WKWebView {
func setDefaultZoom() {
guard let defaultKey = self.defaultKey() else { return }
switch UserDefaults.standard.double(forKey: defaultKey) {
case 0: return
case let zoom: setZoom(zoom.description)
case 0: return
case let zoom: setZoom(zoom.description)
}
}

Expand Down
8 changes: 4 additions & 4 deletions Sources/Shared/Program.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ public class Program: NSObject {

static let title: String = {
switch Bundle.multi?.version {
case .none:
return "Multi"
case .some(let version):
return "Multi — \(version)"
case .none:
return "Multi"
case .some(let version):
return "Multi — \(version)"
}
}()

Expand Down

0 comments on commit 9738e89

Please sign in to comment.