Remove unused code, minor style changes

This commit is contained in:
Arkadiusz Fal 2021-12-20 00:36:12 +01:00
parent 0a5cb5b542
commit ea90f650d8
27 changed files with 74 additions and 114 deletions

View File

@ -3,12 +3,10 @@ import SwiftUI
extension Color { extension Color {
#if os(macOS) #if os(macOS)
static let background = Color(NSColor.windowBackgroundColor) static let background = Color(NSColor.windowBackgroundColor)
static let secondaryBackground = Color(NSColor.underPageBackgroundColor) static let secondaryBackground = Color(NSColor.controlBackgroundColor)
static let tertiaryBackground = Color(NSColor.controlBackgroundColor)
#elseif os(iOS) #elseif os(iOS)
static let background = Color(UIColor.systemBackground) static let background = Color(UIColor.systemBackground)
static let secondaryBackground = Color(UIColor.secondarySystemBackground) static let secondaryBackground = Color(UIColor.secondarySystemBackground)
static let tertiaryBackground = Color(UIColor.tertiarySystemBackground)
#else #else
static func background(scheme: ColorScheme) -> Color { static func background(scheme: ColorScheme) -> Color {
scheme == .dark ? .black : .init(white: 0.8) scheme == .dark ? .black : .init(white: 0.8)

View File

@ -8,10 +8,6 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
@Published var account: Account! @Published var account: Account!
var anonymousAccount: Account {
.init(instanceID: account.instance.id, name: "Anonymous", url: account.instance.apiURL)
}
init(account: Account? = nil) { init(account: Account? = nil) {
super.init() super.init()

View File

@ -16,7 +16,6 @@ final class CommentsModel: ObservableObject {
@Published var repliesPageID: String? @Published var repliesPageID: String?
@Published var repliesLoaded = false @Published var repliesLoaded = false
var accounts: AccountsModel!
var player: PlayerModel! var player: PlayerModel!
static var instance: Instance? { static var instance: Instance? {

View File

@ -74,7 +74,7 @@ final class NavigationModel: ObservableObject {
var tabSelectionBinding: Binding<TabSelection> { var tabSelectionBinding: Binding<TabSelection> {
Binding<TabSelection>( Binding<TabSelection>(
get: { get: {
self.tabSelection ?? .favorites self.tabSelection ?? .search
}, },
set: { newValue in set: { newValue in
self.tabSelection = newValue self.tabSelection = newValue

View File

@ -685,46 +685,47 @@ final class PlayerModel: ObservableObject {
#if os(tvOS) #if os(tvOS)
show() show()
closePipByReplacingItem(wasPlaying: wasPlaying)
#else
closePiPByNilingPlayer(wasPlaying: wasPlaying)
#endif #endif
doClosePiP(wasPlaying: wasPlaying)
} }
private func closePipByReplacingItem(wasPlaying: Bool) { #if os(tvOS)
let item = player.currentItem private func doClosePiP(wasPlaying: Bool) {
let time = player.currentTime() let item = player.currentItem
let time = player.currentTime()
self.player.replaceCurrentItem(with: nil) self.player.replaceCurrentItem(with: nil)
guard !item.isNil else { guard !item.isNil else {
return return
}
self.player.seek(to: time)
self.player.replaceCurrentItem(with: item)
guard wasPlaying else {
return
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
self?.play()
}
} }
#else
private func doClosePiP(wasPlaying: Bool) {
controller?.playerView.player = nil
controller?.playerView.player = player
self.player.seek(to: time) guard wasPlaying else {
self.player.replaceCurrentItem(with: item) return
}
guard wasPlaying else { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
return self?.play()
}
} }
#endif
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
self?.play()
}
}
private func closePiPByNilingPlayer(wasPlaying: Bool) {
controller?.playerView.player = nil
controller?.playerView.player = player
guard wasPlaying else {
return
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
self?.play()
}
}
#if os(macOS) #if os(macOS)
var windowTitle: String { var windowTitle: String {

View File

@ -107,10 +107,6 @@ enum PlayerSidebarSetting: String, CaseIterable, Defaults.Serializable {
enum VisibleSection: String, CaseIterable, Comparable, Defaults.Serializable { enum VisibleSection: String, CaseIterable, Comparable, Defaults.Serializable {
case favorites, subscriptions, popular, trending, playlists case favorites, subscriptions, popular, trending, playlists
static func from(_ string: String) -> VisibleSection {
allCases.first { $0.rawValue == string }!
}
var title: String { var title: String {
rawValue.localizedCapitalized rawValue.localizedCapitalized
} }

View File

@ -51,7 +51,7 @@ struct FavoritesView: View {
.navigationTitle("Favorites") .navigationTitle("Favorites")
#endif #endif
#if os(macOS) #if os(macOS)
.background(Color.tertiaryBackground) .background(Color.secondaryBackground)
.frame(minWidth: 360) .frame(minWidth: 360)
#endif #endif
} }

View File

@ -6,20 +6,19 @@ import SwiftUI
struct AppSidebarNavigation: View { struct AppSidebarNavigation: View {
@EnvironmentObject<AccountsModel> private var accounts @EnvironmentObject<AccountsModel> private var accounts
@EnvironmentObject<CommentsModel> private var comments
@EnvironmentObject<InstancesModel> private var instances
@EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<PlayerModel> private var player
@EnvironmentObject<PlaylistsModel> private var playlists
@EnvironmentObject<RecentsModel> private var recents
@EnvironmentObject<SearchModel> private var search
@EnvironmentObject<SubscriptionsModel> private var subscriptions
@EnvironmentObject<ThumbnailsModel> private var thumbnailsModel
@Default(.visibleSections) private var visibleSections
#if os(iOS) #if os(iOS)
@State private var didApplyPrimaryViewWorkAround = false @State private var didApplyPrimaryViewWorkAround = false
@EnvironmentObject<CommentsModel> private var comments
@EnvironmentObject<InstancesModel> private var instances
@EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<PlayerModel> private var player
@EnvironmentObject<PlaylistsModel> private var playlists
@EnvironmentObject<RecentsModel> private var recents
@EnvironmentObject<SearchModel> private var search
@EnvironmentObject<SubscriptionsModel> private var subscriptions
@EnvironmentObject<ThumbnailsModel> private var thumbnailsModel
#endif #endif
var body: some View { var body: some View {
@ -66,26 +65,22 @@ struct AppSidebarNavigation: View {
#if os(iOS) #if os(iOS)
.background( .background(
EmptyView().fullScreenCover(isPresented: $player.presentingPlayer) { EmptyView().fullScreenCover(isPresented: $player.presentingPlayer) {
videoPlayer VideoPlayerView()
.environmentObject(accounts)
.environmentObject(comments)
.environmentObject(instances)
.environmentObject(navigation)
.environmentObject(player)
.environmentObject(playlists)
.environmentObject(recents)
.environmentObject(subscriptions)
.environmentObject(thumbnailsModel)
.environment(\.navigationStyle, .sidebar) .environment(\.navigationStyle, .sidebar)
} }
) )
#endif #endif
} }
private var videoPlayer: some View {
VideoPlayerView()
.environmentObject(accounts)
.environmentObject(comments)
.environmentObject(instances)
.environmentObject(navigation)
.environmentObject(player)
.environmentObject(playlists)
.environmentObject(recents)
.environmentObject(subscriptions)
.environmentObject(thumbnailsModel)
}
var toolbarContent: some ToolbarContent { var toolbarContent: some ToolbarContent {
Group { Group {
#if os(iOS) #if os(iOS)

View File

@ -123,7 +123,6 @@ struct ContentView: View {
search.accounts = accounts search.accounts = accounts
subscriptions.accounts = accounts subscriptions.accounts = accounts
comments.accounts = accounts
comments.player = player comments.player = player
menu.accounts = accounts menu.accounts = accounts

View File

@ -4,8 +4,6 @@ import SwiftUI
struct Sidebar: View { struct Sidebar: View {
@EnvironmentObject<AccountsModel> private var accounts @EnvironmentObject<AccountsModel> private var accounts
@EnvironmentObject<NavigationModel> private var navigation @EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<PlaylistsModel> private var playlists
@EnvironmentObject<SubscriptionsModel> private var subscriptions
@Default(.visibleSections) private var visibleSections @Default(.visibleSections) private var visibleSections

View File

@ -4,7 +4,6 @@ struct CommentsView: View {
@State private var repliesID: Comment.ID? @State private var repliesID: Comment.ID?
@EnvironmentObject<CommentsModel> private var comments @EnvironmentObject<CommentsModel> private var comments
@EnvironmentObject<PlayerModel> private var player
var body: some View { var body: some View {
Group { Group {

View File

@ -14,7 +14,7 @@ struct VideoPlayerView: View {
} }
@State private var playerSize: CGSize = .zero @State private var playerSize: CGSize = .zero
@State private var fullScreen = false @State private var fullScreenDetails = false
@Environment(\.colorScheme) private var colorScheme @Environment(\.colorScheme) private var colorScheme
@ -95,15 +95,15 @@ struct VideoPlayerView: View {
Group { Group {
#if os(iOS) #if os(iOS)
if verticalSizeClass == .regular { if verticalSizeClass == .regular {
VideoDetails(sidebarQueue: sidebarQueueBinding, fullScreen: $fullScreen) VideoDetails(sidebarQueue: sidebarQueueBinding, fullScreen: $fullScreenDetails)
} }
#else #else
VideoDetails(sidebarQueue: sidebarQueueBinding, fullScreen: $fullScreen) VideoDetails(sidebarQueue: sidebarQueueBinding, fullScreen: $fullScreenDetails)
#endif #endif
} }
.background(colorScheme == .dark ? Color.black : Color.white) .background(colorScheme == .dark ? Color.black : Color.white)
.modifier(VideoDetailsPaddingModifier(geometry: geometry, aspectRatio: player.controller?.aspectRatio, fullScreen: fullScreen)) .modifier(VideoDetailsPaddingModifier(geometry: geometry, aspectRatio: player.controller?.aspectRatio, fullScreen: fullScreenDetails))
} }
#endif #endif
} }
@ -113,12 +113,12 @@ struct VideoPlayerView: View {
#endif #endif
#if os(iOS) #if os(iOS)
if sidebarQueue { if sidebarQueue {
PlayerQueueView(sidebarQueue: .constant(true), fullScreen: $fullScreen) PlayerQueueView(sidebarQueue: .constant(true), fullScreen: $fullScreenDetails)
.frame(maxWidth: 350) .frame(maxWidth: 350)
} }
#elseif os(macOS) #elseif os(macOS)
if Defaults[.playerSidebar] != .never { if Defaults[.playerSidebar] != .never {
PlayerQueueView(sidebarQueue: sidebarQueueBinding, fullScreen: $fullScreen) PlayerQueueView(sidebarQueue: sidebarQueueBinding, fullScreen: $fullScreenDetails)
.frame(minWidth: 300) .frame(minWidth: 300)
} }
#endif #endif

View File

@ -179,7 +179,7 @@ struct PlaylistsView: View {
} }
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity) .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
#if os(macOS) #if os(macOS)
.background(Color.tertiaryBackground) .background(Color.secondaryBackground)
#endif #endif
} }

View File

@ -8,9 +8,6 @@ struct InstanceSettings: View {
@State private var frontendURL = "" @State private var frontendURL = ""
@EnvironmentObject<AccountsModel> private var model
@EnvironmentObject<InstancesModel> private var instances
var instance: Instance! { var instance: Instance! {
InstancesModel.find(instanceID) InstancesModel.find(instanceID)
} }

View File

@ -8,7 +8,6 @@ struct PlaybackSettings: View {
@Default(.playerSidebar) private var playerSidebar @Default(.playerSidebar) private var playerSidebar
@Default(.showKeywords) private var showKeywords @Default(.showKeywords) private var showKeywords
@Default(.showChannelSubscribers) private var channelSubscribers @Default(.showChannelSubscribers) private var channelSubscribers
@Default(.saveHistory) private var saveHistory
@Default(.pauseOnHidingPlayer) private var pauseOnHidingPlayer @Default(.pauseOnHidingPlayer) private var pauseOnHidingPlayer
@Default(.closePiPOnNavigation) private var closePiPOnNavigation @Default(.closePiPOnNavigation) private var closePiPOnNavigation
@Default(.closePiPOnOpeningPlayer) private var closePiPOnOpeningPlayer @Default(.closePiPOnOpeningPlayer) private var closePiPOnOpeningPlayer

View File

@ -19,7 +19,7 @@ struct VerticalCells: View {
} }
.edgesIgnoringSafeArea(.horizontal) .edgesIgnoringSafeArea(.horizontal)
#if os(macOS) #if os(macOS)
.background(Color.tertiaryBackground) .background(Color.secondaryBackground)
.frame(minWidth: 360) .frame(minWidth: 360)
#endif #endif
} }

View File

@ -62,7 +62,7 @@ struct VideoCell: View {
#endif #endif
} }
#if os(macOS) #if os(macOS)
.background(Color.tertiaryBackground) .background(Color.secondaryBackground)
#endif #endif
} }

View File

@ -13,10 +13,10 @@ struct ChannelPlaylistView: View {
#if os(iOS) #if os(iOS)
@Environment(\.inNavigationView) private var inNavigationView @Environment(\.inNavigationView) private var inNavigationView
@EnvironmentObject<PlayerModel> private var player
#endif #endif
@EnvironmentObject<AccountsModel> private var accounts @EnvironmentObject<AccountsModel> private var accounts
@EnvironmentObject<PlayerModel> private var player
var items: [ContentItem] { var items: [ContentItem] {
ContentItem.array(of: store.item?.videos ?? []) ContentItem.array(of: store.item?.videos ?? [])

View File

@ -10,16 +10,15 @@ struct ChannelVideosView: View {
@StateObject private var store = Store<Channel>() @StateObject private var store = Store<Channel>()
@Environment(\.colorScheme) private var colorScheme @Environment(\.colorScheme) private var colorScheme
@Environment(\.presentationMode) private var presentationMode
@Environment(\.inNavigationView) private var inNavigationView
#if os(iOS) #if os(iOS)
@Environment(\.inNavigationView) private var inNavigationView
@Environment(\.horizontalSizeClass) private var horizontalSizeClass @Environment(\.horizontalSizeClass) private var horizontalSizeClass
@EnvironmentObject<PlayerModel> private var player
#endif #endif
@EnvironmentObject<AccountsModel> private var accounts @EnvironmentObject<AccountsModel> private var accounts
@EnvironmentObject<NavigationModel> private var navigation @EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<PlayerModel> private var player
@EnvironmentObject<SubscriptionsModel> private var subscriptions @EnvironmentObject<SubscriptionsModel> private var subscriptions
@Namespace private var focusNamespace @Namespace private var focusNamespace

View File

@ -3,6 +3,7 @@ import SwiftUI
struct LazyView<Content: View>: View { struct LazyView<Content: View>: View {
let build: () -> Content let build: () -> Content
init(_ build: @autoclosure @escaping () -> Content) { init(_ build: @autoclosure @escaping () -> Content) {
self.build = build self.build = build
} }

View File

@ -116,7 +116,7 @@ struct PlayerControlsView<Content: View>: View {
} else { } else {
controls controls
#if !os(tvOS) #if !os(tvOS)
.background(Color.tertiaryBackground) .background(Color.secondaryBackground)
#endif #endif
} }
} }

View File

@ -80,14 +80,6 @@ struct VideoContextMenuView: View {
} }
} }
private var isShowingChannelButton: Bool {
if case .channel = navigation.tabSelection {
return false
}
return !inChannelView
}
private var addToQueueButton: some View { private var addToQueueButton: some View {
Button { Button {
player.enqueueVideo(video) player.enqueueVideo(video)

View File

@ -22,7 +22,7 @@
isa = PBXAggregateTarget; isa = PBXAggregateTarget;
buildConfigurationList = 37FD43E72704A2240073EE42 /* Build configuration list for PBXAggregateTarget "Periphery (macOS)" */; buildConfigurationList = 37FD43E72704A2240073EE42 /* Build configuration list for PBXAggregateTarget "Periphery (macOS)" */;
buildPhases = ( buildPhases = (
37FD43EA2704A2350073EE42 /* ShellScript */, 37FD43EA2704A2350073EE42 /* Run Script */,
); );
dependencies = ( dependencies = (
); );
@ -369,7 +369,6 @@
37B81B0326D2CAE700675966 /* PlaybackBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37B81B0126D2CAE700675966 /* PlaybackBar.swift */; }; 37B81B0326D2CAE700675966 /* PlaybackBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37B81B0126D2CAE700675966 /* PlaybackBar.swift */; };
37BA793B26DB8EE4002A0235 /* PlaylistVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793A26DB8EE4002A0235 /* PlaylistVideosView.swift */; }; 37BA793B26DB8EE4002A0235 /* PlaylistVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793A26DB8EE4002A0235 /* PlaylistVideosView.swift */; };
37BA793C26DB8EE4002A0235 /* PlaylistVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793A26DB8EE4002A0235 /* PlaylistVideosView.swift */; }; 37BA793C26DB8EE4002A0235 /* PlaylistVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793A26DB8EE4002A0235 /* PlaylistVideosView.swift */; };
37BA793D26DB8EE4002A0235 /* PlaylistVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793A26DB8EE4002A0235 /* PlaylistVideosView.swift */; };
37BA793F26DB8F97002A0235 /* ChannelVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793E26DB8F97002A0235 /* ChannelVideosView.swift */; }; 37BA793F26DB8F97002A0235 /* ChannelVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793E26DB8F97002A0235 /* ChannelVideosView.swift */; };
37BA794026DB8F97002A0235 /* ChannelVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793E26DB8F97002A0235 /* ChannelVideosView.swift */; }; 37BA794026DB8F97002A0235 /* ChannelVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793E26DB8F97002A0235 /* ChannelVideosView.swift */; };
37BA794126DB8F97002A0235 /* ChannelVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793E26DB8F97002A0235 /* ChannelVideosView.swift */; }; 37BA794126DB8F97002A0235 /* ChannelVideosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA793E26DB8F97002A0235 /* ChannelVideosView.swift */; };
@ -1668,7 +1667,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "if test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\n\nperiphery scan \\\n --project \"Yattee.xcodeproj\" \\\n --schemes \"Yattee (iOS)\" \\\n --targets \"Yattee (iOS)\" \\\n --retain-objc-accessible \\\n --retain-public \\\n -- -destination \"platform=iOS\\ Simulator,name=iPhone\\ 8,OS=15.0\"\n"; shellScript = "if test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\n\nperiphery scan \\\n --project \"Yattee.xcodeproj\" \\\n --schemes \"Yattee (iOS)\" \\\n --targets \"Yattee (iOS)\" \\\n --retain-objc-accessible \\\n --retain-public \\\n -- -destination \"platform=iOS\\ Simulator,name=iPhone\\ 8,OS=14.5\"\n";
}; };
37CC3F48270CE89B00608308 /* ShellScript */ = { 37CC3F48270CE89B00608308 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
@ -1721,7 +1720,7 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "if test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\n\nexport PATH\n\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; shellScript = "if test -d \"/opt/homebrew/bin/\"; then\n PATH=\"/opt/homebrew/bin/:${PATH}\"\nfi\n\nexport PATH\n\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
}; };
37FD43EA2704A2350073EE42 /* ShellScript */ = { 37FD43EA2704A2350073EE42 /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -1730,6 +1729,7 @@
); );
inputPaths = ( inputPaths = (
); );
name = "Run Script";
outputFileListPaths = ( outputFileListPaths = (
); );
outputPaths = ( outputPaths = (
@ -2231,7 +2231,6 @@
37FB2860272225E800A57617 /* ContentItemView.swift in Sources */, 37FB2860272225E800A57617 /* ContentItemView.swift in Sources */,
374C053727242D9F009BDDBE /* ServicesSettings.swift in Sources */, 374C053727242D9F009BDDBE /* ServicesSettings.swift in Sources */,
37C069802725C8D400F7F6CB /* CMTime+DefaultTimescale.swift in Sources */, 37C069802725C8D400F7F6CB /* CMTime+DefaultTimescale.swift in Sources */,
37BA793D26DB8EE4002A0235 /* PlaylistVideosView.swift in Sources */,
3711404126B206A6005B3555 /* SearchModel.swift in Sources */, 3711404126B206A6005B3555 /* SearchModel.swift in Sources */,
37FD43F02704A9C00073EE42 /* RecentsModel.swift in Sources */, 37FD43F02704A9C00073EE42 /* RecentsModel.swift in Sources */,
379775952689365600DD52A8 /* Array+Next.swift in Sources */, 379775952689365600DD52A8 /* Array+Next.swift in Sources */,

View File

@ -32,7 +32,7 @@ enum OpenWindow: String, CaseIterable {
func open() { func open() {
switch self { switch self {
case .player: case .player:
NSWorkspace.shared.open(URL(string: "yattee://player")!) NSWorkspace.shared.open(URL(string: "yattee://\(location)")!)
case .main: case .main:
Self.main.focus() Self.main.focus()
} }

View File

@ -5,7 +5,6 @@ import SwiftUI
struct AccountSelectionView: View { struct AccountSelectionView: View {
var showHeader = true var showHeader = true
@EnvironmentObject<InstancesModel> private var instancesModel
@EnvironmentObject<AccountsModel> private var accountsModel @EnvironmentObject<AccountsModel> private var accountsModel
@Default(.accounts) private var accounts @Default(.accounts) private var accounts

View File

@ -141,12 +141,6 @@ struct NowPlayingView: View {
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 560, maxHeight: .infinity, alignment: .leading) .frame(minWidth: 0, maxWidth: .infinity, minHeight: 560, maxHeight: .infinity, alignment: .leading)
} }
func header(_ text: String) -> some View {
Text(text)
.font((inInfoViewController ? Font.system(size: 40) : .title3).bold())
.foregroundColor(.secondary)
}
private var progressView: some View { private var progressView: some View {
VStack { VStack {
Spacer() Spacer()

View File

@ -6,7 +6,6 @@ struct TVNavigationView: View {
@EnvironmentObject<NavigationModel> private var navigation @EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<PlayerModel> private var player @EnvironmentObject<PlayerModel> private var player
@EnvironmentObject<RecentsModel> private var recents @EnvironmentObject<RecentsModel> private var recents
@EnvironmentObject<SearchModel> private var search
@Default(.visibleSections) private var visibleSections @Default(.visibleSections) private var visibleSections
var body: some View { var body: some View {