yattee/Model/AppState.swift

20 lines
427 B
Swift
Raw Normal View History

2021-06-11 21:11:59 +00:00
import Foundation
class AppState: ObservableObject {
@Published var showingChannel = false
@Published var channelID: String?
@Published var channel: String?
func setChannel(from video: Video) {
channel = video.author
channelID = video.channelID
showingChannel = true
}
func closeChannel() {
showingChannel = false
channel = nil
channelID = nil
}
}