mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 08:18:19 +00:00
22 lines
541 B
Swift
22 lines
541 B
Swift
import SwiftUI
|
|
|
|
struct NetworkState: View {
|
|
@ObservedObject private var model = NetworkStateModel.shared
|
|
|
|
var body: some View {
|
|
Buffering(state: model.fullStateText)
|
|
.opacity(model.osdVisible ? 1 : 0)
|
|
}
|
|
}
|
|
|
|
struct NetworkState_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
let networkState = NetworkStateModel()
|
|
networkState.bufferingState = 30
|
|
|
|
return NetworkState()
|
|
.environmentObject(networkState)
|
|
.environmentObject(PlayerModel())
|
|
}
|
|
}
|