mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Removed unused swipe gesture (+3 squashed commits)
Squashed commits: [d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier [37c46ab9] Rename Analytics to AnalyticsService [8852a371] #920 - Cleanup ServiceLocator usages
This commit is contained in:
committed by
Stefan Ceriu
parent
b4cd58b209
commit
e6711a0236
+6
-4
@@ -17,12 +17,14 @@
|
||||
import SwiftUI
|
||||
|
||||
final class AnalyticsPromptScreenCoordinator: CoordinatorProtocol {
|
||||
private let analytics: AnalyticsService
|
||||
private var viewModel: AnalyticsPromptScreenViewModel
|
||||
|
||||
var callback: (@MainActor () -> Void)?
|
||||
|
||||
init() {
|
||||
viewModel = AnalyticsPromptScreenViewModel()
|
||||
init(analytics: AnalyticsService, termsURL: URL) {
|
||||
self.analytics = analytics
|
||||
viewModel = AnalyticsPromptScreenViewModel(termsURL: termsURL)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
@@ -34,11 +36,11 @@ final class AnalyticsPromptScreenCoordinator: CoordinatorProtocol {
|
||||
switch result {
|
||||
case .enable:
|
||||
MXLog.info("Enable Analytics")
|
||||
ServiceLocator.shared.analytics.optIn()
|
||||
analytics.optIn()
|
||||
self.callback?()
|
||||
case .disable:
|
||||
MXLog.info("Disable Analytics")
|
||||
ServiceLocator.shared.analytics.optOut()
|
||||
analytics.optOut()
|
||||
self.callback?()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user