yattee/Apple TV/SubscriptionsView.swift

22 lines
489 B
Swift
Raw Normal View History

2021-06-11 22:49:42 +00:00
import SwiftUI
struct SubscriptionsView: View {
@ObservedObject private var provider = SubscriptionVideosProvider()
2021-06-17 10:02:39 +00:00
@EnvironmentObject private var state: AppState
2021-06-11 22:49:42 +00:00
@Binding var tabSelection: TabSelection
var body: some View {
2021-06-17 10:02:39 +00:00
VideosView(tabSelection: $tabSelection, videos: videos)
2021-06-11 22:49:42 +00:00
.task {
2021-06-23 22:19:58 +00:00
Task.init {
2021-06-11 22:49:42 +00:00
provider.load()
}
}
}
var videos: [Video] {
2021-06-14 18:05:02 +00:00
provider.videos
2021-06-11 22:49:42 +00:00
}
}