mirror of
https://github.com/yattee/yattee.git
synced 2026-10-24 05:32:53 +00:00
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.
56 lines
1.3 KiB
Swift
56 lines
1.3 KiB
Swift
//
|
|
// PlaylistVideoRowView.swift
|
|
// Yattee
|
|
//
|
|
// Unified row view for playlist videos (both remote and local playlists).
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
/// Unified row view for displaying videos in playlists.
|
|
/// Used by UnifiedPlaylistDetailView for both remote and local playlists.
|
|
/// Uses VideoRowView for consistent presentation with automatic DeArrow integration.
|
|
struct PlaylistVideoRowView: View {
|
|
let index: Int
|
|
let video: Video
|
|
var watchProgress: Double? = nil
|
|
var onRemove: (() -> Void)? = nil
|
|
|
|
var body: some View {
|
|
VideoRowView(
|
|
video: video,
|
|
style: .regular,
|
|
watchProgress: watchProgress,
|
|
index: index
|
|
)
|
|
.videoContextMenu(
|
|
video: video,
|
|
customActions: onRemove.map { removeAction in
|
|
[VideoContextAction(
|
|
String(localized: "playlist.removeVideo"),
|
|
systemImage: "trash",
|
|
role: .destructive,
|
|
action: removeAction
|
|
)]
|
|
} ?? [],
|
|
context: .playlist
|
|
)
|
|
}
|
|
}
|
|
|
|
// MARK: - Preview
|
|
|
|
#Preview {
|
|
List {
|
|
PlaylistVideoRowView(
|
|
index: 1,
|
|
video: .preview
|
|
)
|
|
PlaylistVideoRowView(
|
|
index: 2,
|
|
video: .preview,
|
|
onRemove: {}
|
|
)
|
|
}
|
|
}
|