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

@@ -179,22 +179,6 @@ actor PlayerControlsLayoutService {
// MARK: - Preset Management
/// Returns all presets for the current device class.
func allPresets() async -> [LayoutPreset] {
if !isLoaded {
_ = try? await loadPresets()
}
return presets.filter { $0.deviceClass == .current }
}
/// Returns a preset by ID.
func preset(forID id: UUID) async -> LayoutPreset? {
if !isLoaded {
_ = try? await loadPresets()
}
return presets.first { $0.id == id }
}
/// Saves a new or updated preset.
func savePreset(_ preset: LayoutPreset) async throws {
if !isLoaded {
@@ -290,13 +274,6 @@ actor PlayerControlsLayoutService {
}
}
/// Duplicates a preset with a new name.
func duplicatePreset(_ preset: LayoutPreset, newName: String) async throws -> LayoutPreset {
let duplicate = preset.duplicate(name: newName)
try await savePreset(duplicate)
return duplicate
}
/// Renames a preset.
func renamePreset(_ presetID: UUID, to newName: String) async throws {
if !isLoaded {
@@ -380,31 +357,6 @@ actor PlayerControlsLayoutService {
return layout
}
// MARK: - Validation
/// Checks if a preset can be deleted.
func canDeletePreset(id: UUID) async -> Bool {
if !isLoaded {
_ = try? await loadPresets()
}
guard let preset = presets.first(where: { $0.id == id }) else {
return false
}
// Cannot delete built-in presets
if preset.isBuiltIn {
return false
}
// Cannot delete active preset
if activePresetID() == id {
return false
}
return true
}
// MARK: - NEW Badge Support
/// Returns the last seen button version.