mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Decouple the bug report service from the analytics one
This commit is contained in:
committed by
Stefan Ceriu
parent
c3571f4f4e
commit
a4c9135b58
@@ -93,6 +93,17 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
|
||||
Self.setupServiceLocator(appSettings: appSettings)
|
||||
|
||||
ServiceLocator.shared.analytics.isRunningPublisher
|
||||
.removeDuplicates()
|
||||
.sink { isRunning in
|
||||
if isRunning {
|
||||
ServiceLocator.shared.bugReportService.start()
|
||||
} else {
|
||||
ServiceLocator.shared.bugReportService.stop()
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
ServiceLocator.shared.analytics.startIfEnabled()
|
||||
|
||||
stateMachine = AppCoordinatorStateMachine()
|
||||
@@ -337,10 +348,9 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
sdkGitSHA: sdkGitSha(),
|
||||
maxUploadSize: appSettings.bugReportMaxUploadSize))
|
||||
let posthogAnalyticsClient = PostHogAnalyticsClient()
|
||||
posthogAnalyticsClient.updateSuperProperties(AnalyticsEvent.SuperProperties(appPlatform: nil, cryptoSDK: .Rust, cryptoSDKVersion: sdkGitSha()))
|
||||
posthogAnalyticsClient.updateSuperProperties(AnalyticsEvent.SuperProperties(appPlatform: .EXI, cryptoSDK: .Rust, cryptoSDKVersion: sdkGitSha()))
|
||||
ServiceLocator.shared.register(analytics: AnalyticsService(client: posthogAnalyticsClient,
|
||||
appSettings: appSettings,
|
||||
bugReportService: ServiceLocator.shared.bugReportService))
|
||||
appSettings: appSettings))
|
||||
}
|
||||
|
||||
/// Perform any required migrations for the app to function correctly.
|
||||
|
||||
Reference in New Issue
Block a user