about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2025-03-17 15:06:26 -0700
committerGitHub <noreply@github.com>2025-03-17 15:06:26 -0700
commitc612fca32a69ed5af769a7c5851598f35d14d1ee (patch)
tree64bd2b050441cc5701a7452bde6ded6bf3dc8267 /src
parent4b7bda705e8428f99af14242ea68369e5bbe59b9 (diff)
downloadvoidsky-c612fca32a69ed5af769a7c5851598f35d14d1ee.tar.zst
remove .parse usage (#8016)
* remove .parse usage

* add one more usage
Diffstat (limited to 'src')
-rw-r--r--src/lib/strings/url-helpers.ts2
-rw-r--r--src/view/com/modals/InAppBrowserConsent.tsx4
-rw-r--r--src/view/com/modals/LinkWarning.tsx2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts
index df473b54e..20c3fabbc 100644
--- a/src/lib/strings/url-helpers.ts
+++ b/src/lib/strings/url-helpers.ts
@@ -323,7 +323,7 @@ export function createBskyAppAbsoluteUrl(path: string): string {
 export function createProxiedUrl(url: string): string {
   let u
   try {
-    u = URL.parse(url)
+    u = new URL(url)
   } catch {
     return url
   }
diff --git a/src/view/com/modals/InAppBrowserConsent.tsx b/src/view/com/modals/InAppBrowserConsent.tsx
index 105edfbc6..7178ff2f2 100644
--- a/src/view/com/modals/InAppBrowserConsent.tsx
+++ b/src/view/com/modals/InAppBrowserConsent.tsx
@@ -24,13 +24,13 @@ export function Component({href}: {href: string}) {
   const onUseIAB = React.useCallback(() => {
     setInAppBrowser(true)
     closeModal()
-    openLink(href, true)
+    openLink(href, true, true)
   }, [closeModal, setInAppBrowser, href, openLink])
 
   const onUseLinking = React.useCallback(() => {
     setInAppBrowser(false)
     closeModal()
-    openLink(href, false)
+    openLink(href, false, true)
   }, [closeModal, setInAppBrowser, href, openLink])
 
   return (
diff --git a/src/view/com/modals/LinkWarning.tsx b/src/view/com/modals/LinkWarning.tsx
index dde4fee60..b0bf76ede 100644
--- a/src/view/com/modals/LinkWarning.tsx
+++ b/src/view/com/modals/LinkWarning.tsx
@@ -39,7 +39,7 @@ export function Component({
     if (share) {
       shareUrl(href)
     } else {
-      openLink(href)
+      openLink(href, false, true)
     }
   }