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

@@ -45,9 +45,6 @@ struct PlayerControlsView: View {
var isPanelPinned: Bool = false
/// Corner layout: fullscreen button toggles the panels
var isCornerLayout: Bool = false
/// Safe area padding from layout (when panel is pinned)
var layoutLeadingSafeArea: CGFloat = 0
var layoutTrailingSafeArea: CGFloat = 0
var onToggleOrientationLock: (() -> Void)? = nil
var isOrientationLocked: Bool = false
var onToggleDetailsVisibility: (() -> Void)? = nil
@@ -140,11 +137,8 @@ struct PlayerControlsView: View {
@State private var targetSeekProgress: Double = 0
@State private var hideTimer: Timer?
@State private var showControls: Bool?
@State private var isAdjustingVolume = false
@State private var isAdjustingBrightness = false
/// Tracks brightness value for side slider (needed because UIScreen.main.brightness isn't observable)
@State private var currentBrightness: Double = UIScreen.main.brightness
@State private var playNextTapCount = 0
/// Track safe area to force re-render when it changes
@State private var currentSafeArea: UIEdgeInsets = .zero
/// Window hosting these controls, captured by `HostWindowReader`. Safe
@@ -440,9 +434,7 @@ struct PlayerControlsView: View {
availableStreams: availableStreams,
currentStream: currentStream,
currentAudioStream: currentAudioStream,
embeddedAudioTracks: embeddedAudioTracks,
embeddedSubtitleTracks: embeddedSubtitleTracks,
currentEmbeddedAudioTrackID: currentEmbeddedAudioTrackID,
currentEmbeddedSubtitleTrackID: currentEmbeddedSubtitleTrackID,
panscanValue: panscanValue,
isPanscanAllowed: isPanscanAllowed,
@@ -1044,8 +1036,7 @@ struct PlayerControlsView: View {
storyboard: storyboard,
seekTime: seekTime,
storyboardService: StoryboardService.shared,
buttonBackground: activeLayout.globalSettings.buttonBackground,
theme: activeLayout.globalSettings.theme
buttonBackground: activeLayout.globalSettings.buttonBackground
)
.position(x: xPosition, y: yPosition)
.transition(.opacity.combined(with: .scale(scale: 0.9)))
@@ -1212,10 +1203,8 @@ struct PlayerControlsView: View {
GestureSeekPreviewView(
storyboard: playerState.preferredStoryboard,
seekTime: seekGesturePreviewTime,
duration: playerState.duration,
storyboardService: StoryboardService.shared,
buttonBackground: activeLayout.globalSettings.buttonBackground,
theme: activeLayout.globalSettings.theme,
chapters: playerState.chapters,
isActive: isSeekGestureActive,
availableWidth: gestureGeometry.size.width