mirror of
https://github.com/yattee/yattee.git
synced 2025-01-09 06:17:10 +00:00
23 lines
708 B
Swift
23 lines
708 B
Swift
|
import Foundation
|
||
|
import SwiftUI
|
||
|
|
||
|
struct FixtureEnvironmentObjectsModifier: ViewModifier {
|
||
|
func body(content: Content) -> some View {
|
||
|
content
|
||
|
.environmentObject(InstancesModel())
|
||
|
.environmentObject(InvidiousAPI())
|
||
|
.environmentObject(NavigationModel())
|
||
|
.environmentObject(PlaybackModel())
|
||
|
.environmentObject(PlaylistsModel())
|
||
|
.environmentObject(RecentsModel())
|
||
|
.environmentObject(SearchModel())
|
||
|
.environmentObject(SubscriptionsModel(api: InvidiousAPI()))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
extension View {
|
||
|
func injectFixtureEnvironmentObjects() -> some View {
|
||
|
modifier(FixtureEnvironmentObjectsModifier())
|
||
|
}
|
||
|
}
|