From 0dc393efdb1ebd500c5931beea9c59d842f51a31 Mon Sep 17 00:00:00 2001 From: PARAIPAN SORIN <51127880+PARAIPAN9@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:33:09 +0100 Subject: [PATCH] Configure the route builder with the latest browsing state before handling the deeplink (#19328) --- firefox-ios/Client/Application/SceneDelegate.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firefox-ios/Client/Application/SceneDelegate.swift b/firefox-ios/Client/Application/SceneDelegate.swift index 63bc82fbc611..97570dd37ae5 100644 --- a/firefox-ios/Client/Application/SceneDelegate.swift +++ b/firefox-ios/Client/Application/SceneDelegate.swift @@ -92,6 +92,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { _ scene: UIScene, openURLContexts URLContexts: Set ) { + // Configure the route with the latest browsing state. + routeBuilder.configure( + isPrivate: UserDefaults.standard.bool( + forKey: PrefsKeys.LastSessionWasPrivate + ), + prefs: profile.prefs + ) guard let url = URLContexts.first?.url, let route = routeBuilder.makeRoute(url: url) else { return } handle(route: route)