1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 23:00:32 +05:30
yattee/Model/AppState.swift

21 lines
460 B
Swift
Raw Normal View History

2021-06-14 23:35:02 +05:30
import AVFoundation
2021-06-12 02:41:59 +05:30
import Foundation
2021-06-14 23:35:02 +05:30
final class AppState: ObservableObject {
2021-06-12 02:41:59 +05:30
@Published var showingChannel = false
2021-06-12 04:19:42 +05:30
@Published var channelID: String = ""
@Published var channel: String = ""
2021-06-12 02:41:59 +05:30
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
2021-06-12 04:19:42 +05:30
channel = ""
channelID = ""
2021-06-12 02:41:59 +05:30
}
}