1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-16 07:10:31 +05:30
yattee/Model/AppState.swift

20 lines
428 B
Swift
Raw Normal View History

2021-06-12 02:41:59 +05:30
import Foundation
class AppState: ObservableObject {
@Published var showingChannel = false
@Published var channelID: String?
@Published var channel: String?
2021-06-12 03:10:35 +05:30
func openChannel(from video: Video) {
2021-06-12 02:41:59 +05:30
channel = video.author
channelID = video.channelID
showingChannel = true
}
func closeChannel() {
showingChannel = false
channel = nil
channelID = nil
}
}