about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-10-10 15:11:43 -0700
committerGitHub <noreply@github.com>2024-10-10 15:11:43 -0700
commite1a696bcbbb6f8c2c95ed742a6455d5bf3e4fa69 (patch)
tree986ff0992ed8d2a0feeff51d8da20948e7e80a13 /modules
parent528e601f4bb3f82b87954dda15ba0e996181931f (diff)
downloadvoidsky-e1a696bcbbb6f8c2c95ed742a6455d5bf3e4fa69.tar.zst
More clip stuff for Apple (#5672)
Diffstat (limited to 'modules')
-rw-r--r--modules/BlueskyClip/ViewController.swift9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/BlueskyClip/ViewController.swift b/modules/BlueskyClip/ViewController.swift
index 5385ab700..e8adb5325 100644
--- a/modules/BlueskyClip/ViewController.swift
+++ b/modules/BlueskyClip/ViewController.swift
@@ -34,6 +34,7 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele
     webView.navigationDelegate = self
     self.view.addSubview(webView)
     self.webView = webView
+    self.webView?.load(URLRequest(url: URL(string: "https://bsky.app/?splash=true&clip=true")!))
   }
 
   func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
@@ -45,13 +46,11 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele
     
     switch payload.action {
     case .present:
-      guard let url = self.starterPackUrl else {
-        return
-      }
-
       self.presentAppStoreOverlay()
-      defaults?.setValue(url.absoluteString, forKey: "starterPackUri")
 
+      if let url = self.starterPackUrl {
+        defaults?.setValue(url.absoluteString, forKey: "starterPackUri")
+      }
     case .store:
       guard let keyToStoreAs = payload.keyToStoreAs, let jsonToStore = payload.jsonToStore else {
         return