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

@@ -59,7 +59,6 @@ enum DataContextValidity: Hashable, Sendable {
@Observable
final class DataContextValidator {
private let accountsManager: AccountsManager
private let instancesManager: InstancesManager
private let toastManager: ToastManager
private weak var appEnvironment: AppEnvironment?
@@ -69,7 +68,6 @@ final class DataContextValidator {
toastManager: ToastManager
) {
self.accountsManager = accountsManager
self.instancesManager = instancesManager
self.toastManager = toastManager
}

View File

@@ -18,7 +18,6 @@ final class InvidiousSubscriptionProvider: SubscriptionProvider {
/// The account this provider is bound to. One provider per account, so two
/// logins on the same instance never share a subscription cache.
let account: Account
var context: DataContext { .account(account.id) }
private let invidiousAPI: InvidiousAPI
private let credentialsManager: InvidiousCredentialsManager
@@ -36,7 +35,6 @@ final class InvidiousSubscriptionProvider: SubscriptionProvider {
accountsManager.recordServerOutcome(error, for: account)
}
private let settingsManager: SettingsManager
/// In-memory cache of subscribed channel IDs for fast lookup.
private var cachedChannelIDs: Set<String> = []
@@ -60,7 +58,6 @@ final class InvidiousSubscriptionProvider: SubscriptionProvider {
self.invidiousAPI = invidiousAPI
self.credentialsManager = credentialsManager
self.accountsManager = accountsManager
self.settingsManager = settingsManager
}
// MARK: - SubscriptionProvider

View File

@@ -14,7 +14,6 @@ import Foundation
final class LocalSubscriptionProvider: SubscriptionProvider {
// MARK: - Properties
let context: DataContext = .local
private let dataManager: DataManager
// MARK: - Initialization

View File

@@ -18,7 +18,6 @@ final class PipedSubscriptionProvider: SubscriptionProvider {
/// The account this provider is bound to. One provider per account, so two
/// logins on the same instance never share a subscription cache.
let account: Account
var context: DataContext { .account(account.id) }
private let pipedAPI: PipedAPI
private let credentialsManager: PipedCredentialsManager
@@ -36,7 +35,6 @@ final class PipedSubscriptionProvider: SubscriptionProvider {
accountsManager.recordServerOutcome(error, for: account)
}
private let settingsManager: SettingsManager
/// In-memory cache of subscribed channel IDs for fast lookup.
private var cachedChannelIDs: Set<String> = []
@@ -60,7 +58,6 @@ final class PipedSubscriptionProvider: SubscriptionProvider {
self.pipedAPI = pipedAPI
self.credentialsManager = credentialsManager
self.accountsManager = accountsManager
self.settingsManager = settingsManager
}
// MARK: - SubscriptionProvider

View File

@@ -12,13 +12,6 @@ import Foundation
/// Each provider implementation handles a specific subscription source.
@MainActor
protocol SubscriptionProvider: Sendable {
/// The data context this provider serves.
///
/// A context rather than a backend type: an instance can hold several
/// accounts, so "which Invidious" is no longer enough to identify a
/// provider — each account gets its own, with its own cache.
var context: DataContext { get }
/// Fetches all subscriptions from the provider.
/// - Returns: Array of channels the user is subscribed to.
func fetchSubscriptions() async throws -> [Channel]