From 2e25a303b0f2d92a0a68702d2d8fd84b9d962b0f Mon Sep 17 00:00:00 2001 From: James Magahern Date: Mon, 13 Sep 2021 13:59:52 -0700 Subject: [PATCH] Make it so when a URL is opened and there are no open tabs, use the existing tab --- App/SceneDelegate.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/App/SceneDelegate.swift b/App/SceneDelegate.swift index 6d8cc46..939f66d 100644 --- a/App/SceneDelegate.swift +++ b/App/SceneDelegate.swift @@ -53,7 +53,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { for urlContext in URLContexts { - browserViewController?.createNewTab(withURL: urlContext.url) + if browserViewController?.tab.url == nil { + browserViewController?.tab.beginLoadingURL(urlContext.url) + } else { + browserViewController?.createNewTab(withURL: urlContext.url) + } } } }