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

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

View File

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

View File

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

View File

@@ -116,7 +116,7 @@ struct PlayerControlsView<Content: View>: View {
} else {
controls
#if !os(tvOS)
.background(Color.tertiaryBackground)
.background(Color.secondaryBackground)
#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 {
Button {
player.enqueueVideo(video)