Update Riot/Modules/Common/SwiftUI/DependencyContainerKey.swift

Co-authored-by: manuroe <manuroe@users.noreply.github.com>
This commit is contained in:
David Langley 2021-08-18 09:23:18 +01:00 committed by GitHub
parent 67e09001ac
commit 62d340ac6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ extension View {
A modifier for adding a dependency to the SwiftUI view hierarchy's dependency container.
Important: When adding a dependency to cast it to the type in which it will be injected.
So if adding `MockDependency` but type at injection is `Dependency` remember to cast
to `Dependency`first.
to `Dependency` first.
*/
func addDependency<T>(_ dependency: T) -> some View {
transformEnvironment(\.dependencies) { container in