Remove dead code found by Periphery on all platforms

Delete declarations that Periphery reports unused on every platform that
compiles them (iOS, macOS, tvOS), including nine views used only by their
own previews. Platform-gated code still used on another platform, device-
only MPV render paths, migration models, CloudKit record names, App
Intents metadata and unused parameters are kept.
This commit is contained in:
Arkadiusz Fal
2026-10-08 23:57:56 +02:00
parent 45e19e6536
commit 4770bbe3b9
141 changed files with 14 additions and 4191 deletions

View File

@@ -1,25 +0,0 @@
//
// SidebarAdaptableModifier.swift
// Yattee
//
// Navigation-related view modifiers.
//
import SwiftUI
// MARK: - Sidebar Adaptable Modifier
#if os(iOS)
struct SidebarAdaptableModifier: ViewModifier {
func body(content: Content) -> some View {
content.tabViewStyle(.sidebarAdaptable)
}
}
extension View {
/// Applies sidebar adaptable style.
func sidebarAdaptable() -> some View {
modifier(SidebarAdaptableModifier())
}
}
#endif

View File

@@ -1,69 +0,0 @@
//
// SidebarChannelRow.swift
// Yattee
//
// Compact channel row for sidebar display.
//
import SwiftUI
import NukeUI
struct SidebarChannelRow: View {
let name: String
let avatarURL: URL?
var authHeader: String?
var body: some View {
HStack(spacing: 8) {
// Avatar
LazyImage(request: AvatarURLBuilder.imageRequest(url: avatarURL, authHeader: authHeader)) { state in
if let image = state.image {
image
.resizable()
.aspectRatio(contentMode: .fill)
} else {
avatarPlaceholder
}
}
.frame(width: 24, height: 24)
.clipShape(Circle())
// Name
Text(name)
.lineLimit(1)
.truncationMode(.tail)
}
}
private var avatarPlaceholder: some View {
Circle()
.fill(.quaternary)
.overlay {
Text(String(name.prefix(1)).uppercased())
.font(.caption2.bold())
.foregroundStyle(.secondary)
}
}
}
// MARK: - Preview
#if !os(tvOS)
#Preview {
List {
SidebarChannelRow(
name: "Technology Reviews",
avatarURL: nil
)
SidebarChannelRow(
name: "Music & Sound Design",
avatarURL: nil
)
SidebarChannelRow(
name: "A Very Long Channel Name That Should Be Truncated",
avatarURL: nil
)
}
.listStyle(.sidebar)
}
#endif

View File

@@ -1,63 +0,0 @@
//
// SidebarPlaylistRow.swift
// Yattee
//
// Compact playlist row for sidebar display.
//
import SwiftUI
struct SidebarPlaylistRow: View {
let title: String
let videoCount: Int
var body: some View {
HStack(spacing: 8) {
// Icon
Image(systemName: "list.bullet.rectangle")
.font(.system(size: 14))
.foregroundStyle(.secondary)
.frame(width: 24, height: 24)
// Title and count
Text(title)
.lineLimit(1)
.truncationMode(.tail)
Spacer()
// Video count badge
if videoCount > 0 {
Text("\(videoCount)")
.font(.caption2.monospacedDigit())
.foregroundStyle(.secondary)
}
}
}
}
// MARK: - Preview
#if !os(tvOS)
#Preview {
List {
SidebarPlaylistRow(
title: "Watch Later",
videoCount: 12
)
SidebarPlaylistRow(
title: "Favorites",
videoCount: 45
)
SidebarPlaylistRow(
title: "A Very Long Playlist Name That Should Be Truncated",
videoCount: 100
)
SidebarPlaylistRow(
title: "Empty Playlist",
videoCount: 0
)
}
.listStyle(.sidebar)
}
#endif