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

@@ -288,19 +288,6 @@ final class NavigationCoordinator {
}
}
/// Scrolls the player into view (uncovered position).
func scrollPlayerIntoView() {
isPlayerScrollAnimating = true
scrollPlayerIntoViewTrigger += 1
}
/// Waits until player scroll animation completes.
func waitForPlayerScrollAnimation() async {
while isPlayerScrollAnimating {
try? await Task.sleep(for: .milliseconds(50))
}
}
// MARK: - Convenience Navigation
/// Navigate to the subscriptions tab/feed.
@@ -322,13 +309,6 @@ final class NavigationCoordinator {
navigate(to: destination)
}
/// Navigate to a video by its ID string.
/// Creates a VideoID assuming YouTube source.
func navigateToVideo(videoID: String) {
let id = VideoID(source: .global(provider: ContentSource.youtubeProvider), videoID: videoID)
navigate(to: .video(.id(id)))
}
/// Navigate to a video's channel/source.
/// For media source videos (SMB, WebDAV, local), navigates to the parent directory.
/// For extracted videos, navigates to the external channel URL.

View File

@@ -244,7 +244,7 @@ final class SidebarManager {
private func loadPlaylists() {
guard let dataManager else { return }
// Cache playlists for use in videoCount(for:)
// Cache playlists for use in thumbnailURL(for:)
cachedPlaylists = dataManager.playlists()
let sortOrder = settingsManager?.sidebarPlaylistSort ?? .alphabetical
let limitEnabled = settingsManager?.sidebarPlaylistsLimitEnabled ?? false
@@ -424,20 +424,6 @@ final class SidebarManager {
// MARK: - Playlist Data Access
/// Returns video count for a playlist sidebar item.
/// Uses cached playlists to avoid repeated DB queries during layout.
func videoCount(for item: SidebarItem) -> Int {
switch item {
case .playlist(let id, _):
return cachedPlaylists.first { $0.id == id }?.videoCount ?? 0
case .remotePlaylist(let id, _, let accountID):
return remotePlaylistsCache?.playlists(for: accountID)?
.first { $0.id == id }?.videoCount ?? 0
default:
return 0
}
}
/// Returns thumbnail URL for a playlist sidebar item.
/// Uses cached playlists to avoid repeated DB queries during layout.
func thumbnailURL(for item: SidebarItem) -> URL? {