diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-08-13 22:15:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-13 22:15:08 +0300 |
commit | d5cc19f282b1e7656cf5ea60eb689819fdac2671 (patch) | |
tree | f099dadd85eccda73107d86922525d6ba5894bb7 /modules/BlueskyClip/ViewController.swift | |
parent | edd205483d24b4806e4ef436f5bcfe48e32d0f4a (diff) | |
download | voidsky-d5cc19f282b1e7656cf5ea60eb689819fdac2671.tar.zst |
run `lint-native:fix` (#8836)
Diffstat (limited to 'modules/BlueskyClip/ViewController.swift')
-rw-r--r-- | modules/BlueskyClip/ViewController.swift | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/BlueskyClip/ViewController.swift b/modules/BlueskyClip/ViewController.swift index e8adb5325..ef17765a4 100644 --- a/modules/BlueskyClip/ViewController.swift +++ b/modules/BlueskyClip/ViewController.swift @@ -43,7 +43,7 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele let payload = try? JSONDecoder().decode(WebViewActionPayload.self, from: data) else { return } - + switch payload.action { case .present: self.presentAppStoreOverlay() @@ -65,18 +65,18 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele guard let url = navigationAction.request.url else { return .allow } - + // Store the previous one to compare later, but only set starterPackUrl when we find the right one prevUrl = url // pathComponents starts with "/" as the first component, then each path name. so... // ["/", "start", "name", "rkey"] - if isStarterPackUrl(url){ + if isStarterPackUrl(url) { self.starterPackUrl = url } - + return .allow } - + func isStarterPackUrl(_ url: URL) -> Bool { var host: String? if #available(iOS 16.0, *) { @@ -84,11 +84,11 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele } else { host = url.host } - + switch host { case "bsky.app": if url.pathComponents.count == 4, - (url.pathComponents[1] == "start" || url.pathComponents[1] == "starter-pack") { + url.pathComponents[1] == "start" || url.pathComponents[1] == "starter-pack" { return true } return false |