Remove unused code

This commit is contained in:
Arkadiusz Fal
2023-04-22 22:44:59 +02:00
parent 2d02d9b472
commit 5c0cf7452c
28 changed files with 41 additions and 137 deletions

View File

@@ -37,12 +37,6 @@ struct ChannelCell: View {
.buttonStyle(.plain)
}
var label: some View {
labelContent
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
.contentShape(RoundedRectangle(cornerRadius: 12))
}
var labelContent: some View {
VStack {
WebImage(url: channel.thumbnailURL, options: [.lowPriority])

View File

@@ -6,8 +6,6 @@ struct ChannelPlaylistCell: View {
@Environment(\.navigationStyle) private var navigationStyle
var navigation = NavigationModel.shared
var body: some View {
if navigationStyle == .tab {
NavigationLink(destination: ChannelPlaylistView(playlist: playlist)) { cell }

View File

@@ -6,13 +6,9 @@ struct ChannelPlaylistView: View {
var playlist: ChannelPlaylist?
var showCloseButton = false
@State private var presentingShareSheet = false
@State private var shareURL: URL?
@StateObject private var store = Store<ChannelPlaylist>()
@Environment(\.colorScheme) private var colorScheme
@Environment(\.navigationStyle) private var navigationStyle
@Default(.channelPlaylistListingStyle) private var channelPlaylistListingStyle
@Default(.hideShorts) private var hideShorts

View File

@@ -21,10 +21,6 @@ struct ChannelVideosView: View {
@Environment(\.colorScheme) private var colorScheme
#if os(iOS)
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
#endif
@ObservedObject private var accounts = AccountsModel.shared
@ObservedObject private var feed = FeedModel.shared
@ObservedObject private var navigation = NavigationModel.shared
@@ -145,30 +141,22 @@ struct ChannelVideosView: View {
contentTypePicker
}
ToolbarItem {
ToolbarItemGroup {
HStack(spacing: 3) {
subscriptionsLabel
viewsLabel
}
}
ToolbarItem {
if let contentItem = presentedChannel?.contentItem {
ShareButton(contentItem: contentItem)
}
}
ToolbarItem {
subscriptionToggleButton
.layoutPriority(2)
}
ToolbarItem {
favoriteButton
.labelStyle(.iconOnly)
}
ToolbarItem {
toggleWatchedButton
.labelStyle(.iconOnly)
}