yattee/Model/AppState.swift
2021-06-26 13:37:24 +02:00

21 lines
460 B
Swift

import AVFoundation
import Foundation
final class AppState: ObservableObject {
@Published var showingChannel = false
@Published var channelID: String = ""
@Published var channel: String = ""
func openChannel(from video: Video) {
channel = video.author
channelID = video.channelID
showingChannel = true
}
func closeChannel() {
showingChannel = false
channel = ""
channelID = ""
}
}