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

@@ -307,11 +307,6 @@ struct ChannelView: View {
avatarSize - (avatarSize - collapsedAvatarSize) * collapseProgress
}
/// Opacity for expanded content (fades out as we scroll)
private var expandedContentOpacity: CGFloat {
1 - min(collapseProgress * 2, 1)
}
/// Opacity for collapsed title (fades in as we scroll)
private var collapsedTitleOpacity: CGFloat {
max((collapseProgress - 0.5) * 2, 0)
@@ -785,11 +780,6 @@ struct ChannelView: View {
.animation(.easeInOut(duration: 0.25), value: isDescriptionScrollLocked)
}
@ViewBuilder
private func tvOSAvatar(for channel: Channel) -> some View {
tvOSAvatar(name: channel.name, thumbnailURL: channel.thumbnailURL)
}
@ViewBuilder
private func tvOSAvatar(name: String, thumbnailURL: URL?) -> some View {
LazyImage(url: thumbnailURL) { state in
@@ -2246,13 +2236,6 @@ struct ChannelView: View {
isSearchLoading = false
}
private func clearSearch() {
isSearchActive = false
hasSearched = false
searchResults = .empty
searchText = ""
}
// MARK: - Error View
private func errorView(_ error: String) -> some View {
@@ -2272,11 +2255,6 @@ struct ChannelView: View {
// MARK: - Helpers
private func formatSubscribers(_ count: Int) -> String {
let formatted = CountFormatter.compact(count)
return String(localized: "channel.subscriberCount \(formatted)")
}
/// Returns the appropriate instance for the channel's content source
private func instanceForSource() -> Instance? {
appEnvironment?.instancesManager.instance(for: source)