mirror of
https://github.com/yattee/yattee.git
synced 2024-12-23 05:53:41 +00:00
20 lines
427 B
Swift
20 lines
427 B
Swift
|
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
|
||
|
}
|
||
|
}
|