mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Use the new @Entry macro everywhere.
Fix analytics service optionality.
This commit is contained in:
@@ -7,13 +7,6 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
private struct AnalyticsServiceKey: EnvironmentKey {
|
||||
static let defaultValue: AnalyticsService = ServiceLocator.shared.analytics
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
var analyticsService: AnalyticsService {
|
||||
get { self[AnalyticsServiceKey.self] }
|
||||
set { self[AnalyticsServiceKey.self] = newValue }
|
||||
}
|
||||
@Entry var analyticsService: AnalyticsService = ServiceLocator.shared.analytics
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user