Use the new @Entry macro everywhere.

Fix analytics service optionality.
This commit is contained in:
Doug
2024-10-01 13:34:16 +01:00
committed by Doug
parent e0ee4be834
commit 77e4fae2fb
4 changed files with 4 additions and 45 deletions
@@ -203,15 +203,3 @@ extension RoomScreenViewModel {
analyticsService: ServiceLocator.shared.analytics)
}
}
private struct RoomContextKey: EnvironmentKey {
@MainActor static let defaultValue: RoomScreenViewModel.Context? = nil
}
extension EnvironmentValues {
/// Used to access and inject the room context without observing it
var roomContext: RoomScreenViewModel.Context? {
get { self[RoomContextKey.self] }
set { self[RoomContextKey.self] = newValue }
}
}