From 5212141fceeacd7b3e74cfc8d77b04f5f4c5a928 Mon Sep 17 00:00:00 2001 From: Daniel Bernal Date: Fri, 11 Oct 2024 20:03:31 +0200 Subject: [PATCH] Use Local navigationType instead --- DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift | 2 +- DuckDuckGoTests/YoutublePlayerNavigationHandlerTests.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift b/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift index 767b0bac9f..ae0c929a13 100644 --- a/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift +++ b/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift @@ -552,7 +552,7 @@ extension DuckPlayerNavigationHandler: DuckPlayerNavigationHandling { isFeatureEnabled && isSubFeatureEnabled && isDuckPlayer && - navigationAction.navigationType == .linkActivated && + self.navigationType == .linkActivated && isDuckPlayerEnabled { return true } diff --git a/DuckDuckGoTests/YoutublePlayerNavigationHandlerTests.swift b/DuckDuckGoTests/YoutublePlayerNavigationHandlerTests.swift index 034f2d16d3..a2f33fcd76 100644 --- a/DuckDuckGoTests/YoutublePlayerNavigationHandlerTests.swift +++ b/DuckDuckGoTests/YoutublePlayerNavigationHandlerTests.swift @@ -493,6 +493,7 @@ class DuckPlayerNavigationHandlerTests: XCTestCase { let player = MockDuckPlayer(settings: playerSettings, featureFlagger: featureFlagger) let handler = DuckPlayerNavigationHandler(duckPlayer: player, featureFlagger: featureFlagger, appSettings: mockAppSettings, experiment: DuckPlayerExperimentMock()) + handler.navigationType = .linkActivated playerSettings.mode = .disabled mockAppSettings.duckPlayerOpenInNewTab = true