mirror of
https://github.com/yattee/yattee.git
synced 2026-11-06 03:47:17 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user