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

@@ -187,14 +187,12 @@ private final class DragToDismissGestureHandler: NSObject, UIGestureRecognizerDe
// Main window scaling callbacks (Apple Music-style effect)
var onMainWindowScaleChanged: ((CGFloat) -> Void)?
var onMainWindowScaleAnimated: ((CGFloat) -> Void)? // Animated scale to progress
var onMainWindowScaleReset: ((Bool) -> Void)? // Bool = animated
private let dismissThreshold: CGFloat = 100
private var isDismissing = false
private var scrollViewAtTop = false
private weak var trackedScrollView: UIScrollView?
private var scrollObservation: NSKeyValueObservation?
private var originalBackgroundColor: UIColor?
// Panscan gesture state
private var basePanscan: Double = 0.0
@@ -632,12 +630,6 @@ final class ExpandedPlayerWindowManager {
return window
}
/// The view to apply transforms to (first subview of main window)
/// Note: For actual transformations, use scaledPresentingView which caches the reference
private var presentingView: UIView? {
mainWindow?.subviews.first
}
/// Applies scale and corner radius to main window based on progress (0 = normal, 1 = fully scaled)
func scaleMainWindow(progress: CGFloat) {
// Capture the presenting view reference on first call
@@ -689,18 +681,6 @@ final class ExpandedPlayerWindowManager {
}
}
/// Resets main window to normal state with animation
func resetMainWindowAnimated(duration: TimeInterval = 0.3) {
let view = scaledPresentingView ?? mainWindow?.subviews.first
UIView.animate(withDuration: duration) {
view?.layer.cornerRadius = 0
view?.transform = .identity
} completion: { [weak self] _ in
view?.layer.masksToBounds = false
self?.scaledPresentingView = nil
}
}
/// Resets main window to normal state immediately
func resetMainWindowImmediate() {
// Reset ALL subviews of the main window to handle rotation edge cases
@@ -764,10 +744,6 @@ final class ExpandedPlayerWindowManager {
}
}
var isPresented: Bool {
expandedWindow != nil
}
func show(with appEnvironment: AppEnvironment, animated: Bool = true) {
LoggingService.shared.logPlayer("[ExpandedPlayerWindowManager] show called, expandedWindow=\(expandedWindow != nil), animated=\(animated), retryCount=\(showRetryCount)")
guard expandedWindow == nil else { return }