mirror of
https://github.com/yattee/yattee.git
synced 2026-10-24 13:42:54 +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:
@@ -45,13 +45,6 @@ actor ProxyDetectionCache {
|
||||
return entry.decision
|
||||
}
|
||||
|
||||
/// Most-recently-seen CDN URL for this instance. Used by ``prewarm`` so we
|
||||
/// don't have to wait for the current video's API response just to learn a
|
||||
/// URL to probe.
|
||||
func lastSampleURL(for instance: Instance) -> URL? {
|
||||
entries[instance.id]?.sampleURL
|
||||
}
|
||||
|
||||
/// Records a verdict (decision + the URL we probed against, kept as a
|
||||
/// future probe sample). Refreshes the TTL.
|
||||
func record(decision: Bool, sampleURL: URL?, for instance: Instance) {
|
||||
@@ -115,12 +108,4 @@ actor ProxyDetectionCache {
|
||||
inFlight[instance.id]?.cancel()
|
||||
inFlight.removeValue(forKey: instance.id)
|
||||
}
|
||||
|
||||
/// Drop all entries — e.g. after a network reachability change or when the
|
||||
/// instances collection mutates broadly.
|
||||
func invalidateAll() {
|
||||
entries.removeAll()
|
||||
for (_, task) in inFlight { task.cancel() }
|
||||
inFlight.removeAll()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user