Simple view display switching

This commit is contained in:
Arkadiusz Fal
2021-06-26 13:37:24 +02:00
parent b336d2c512
commit 15bfaf7497
12 changed files with 74 additions and 32 deletions

View File

@@ -6,8 +6,6 @@ final class AppState: ObservableObject {
@Published var channelID: String = ""
@Published var channel: String = ""
@Published var profile = Profile()
func openChannel(from video: Video) {
channel = video.author
channelID = video.channelID

View File

@@ -22,7 +22,7 @@ final class PlayerState: ObservableObject {
@Published var currentSegment: Segment?
private var profile = Profile()
private(set) var profile = Profile()
@Published private(set) var currentRate: Float = 0.0
static let availablePlaybackRates: [Double] = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]

View File

@@ -1,16 +1,16 @@
import Foundation
final class Profile: ObservableObject {
let defaultStreamResolution: DefaultStreamResolution = .hd720pFirstThenBest
var defaultStreamResolution: DefaultStreamResolution = .hd720pFirstThenBest
let skippedSegmentsCategories = [String]() // SponsorBlockSegmentsProvider.categories
var skippedSegmentsCategories = [String]() // SponsorBlockSegmentsProvider.categories
// let sid = "B3_WzklziGu8JKefihLrCsTNavdj73KMiPUBfN5HW2M="
let sid = "RpoS7YPPK2-QS81jJF9z4KSQAjmzsOnMpn84c73-GQ8="
// var sid = "B3_WzklziGu8JKefihLrCsTNavdj73KMiPUBfN5HW2M="
var sid = "RpoS7YPPK2-QS81jJF9z4KSQAjmzsOnMpn84c73-GQ8="
let listing = VideoListing.cells
@Published var listing = VideoListing.cells
let cellsColumns = 3
var cellsColumns = 3
}
enum VideoListing: String {