From 7cc91f2116c8864fa360b47d08782135e66d9ea0 Mon Sep 17 00:00:00 2001 From: Anton Yarmolenko <37253+rnr@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:13:02 +0100 Subject: [PATCH] chore: fix after merge --- Core/Core/View/Base/LogistrationBottomView.swift | 4 ++++ .../Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/Core/View/Base/LogistrationBottomView.swift b/Core/Core/View/Base/LogistrationBottomView.swift index d5da22cc..c902a1b4 100644 --- a/Core/Core/View/Base/LogistrationBottomView.swift +++ b/Core/Core/View/Base/LogistrationBottomView.swift @@ -15,6 +15,10 @@ public enum LogistrationSourceScreen: Equatable, Sendable { case discovery case courseDetail(String, String) case programDetails(String) + + public var value: String? { + return String(describing: self).components(separatedBy: "(").first + } } public enum LogistrationAction: Sendable { diff --git a/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift b/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift index 86e5e96e..1c70dcdf 100644 --- a/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift +++ b/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift @@ -150,7 +150,7 @@ extension DiscoveryWebviewViewModel: WebViewNavigationDelegate { screen: self?.sourceScreen.value ?? "", action: "cancel" ) - }, okTapped: { + }, okTapped: { [weak self] in UIApplication.shared.open(url, options: [:]) self?.analytics.externalLinkOpenAction( url: url.absoluteString,