Make it so when a URL is opened and there are no open tabs, use the existing tab

This commit is contained in:
James Magahern
2021-09-13 13:59:52 -07:00
parent 864260bad3
commit 2e25a303b0

View File

@@ -53,7 +53,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
{ {
for urlContext in URLContexts { 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)
}
} }
} }
} }