mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Update Riot/Modules/Common/SwiftUI/DependencyContainerKey.swift
Co-authored-by: manuroe <manuroe@users.noreply.github.com>
This commit is contained in:
parent
67e09001ac
commit
62d340ac6b
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue