mirror of
https://github.com/yattee/yattee.git
synced 2024-11-14 01:58:24 +00:00
19 lines
374 B
Swift
19 lines
374 B
Swift
import SwiftUI
|
|
|
|
struct SubscriptionsView: View {
|
|
@ObservedObject private var store = Store<[Video]>()
|
|
|
|
var resource = InvidiousAPI.shared.subscriptions
|
|
|
|
init() {
|
|
resource.addObserver(store)
|
|
}
|
|
|
|
var body: some View {
|
|
VideosView(videos: store.collection)
|
|
.onAppear {
|
|
resource.loadIfNeeded()
|
|
}
|
|
}
|
|
}
|