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,8 +53,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
{
for urlContext in URLContexts {
if browserViewController?.tab.url == nil {
browserViewController?.tab.beginLoadingURL(urlContext.url)
} else {
browserViewController?.createNewTab(withURL: urlContext.url)
}
}
}
}