1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-16 07:10:31 +05:30
yattee/Model/AppState.swift
2021-06-11 23:41:03 +02:00

20 lines
428 B
Swift

import Foundation
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 = nil
channelID = nil
}
}