mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 01:39:46 +00:00
Refactor views
This commit is contained in:
@@ -13,10 +13,12 @@ import SwiftUI
|
||||
/// For completed downloads, uses VideoRowView with tap zone support (thumbnail plays, text opens info).
|
||||
/// For active downloads, shows custom progress UI with no tap actions.
|
||||
struct DownloadRowView: View {
|
||||
@Environment(\.appEnvironment) private var appEnvironment
|
||||
|
||||
let download: Download
|
||||
let isActive: Bool
|
||||
var onDelete: (() -> Void)? = nil
|
||||
|
||||
|
||||
// Queue context (optional, enables auto-play when provided)
|
||||
var queueSource: QueueSource? = nil
|
||||
var sourceLabel: String? = nil
|
||||
@@ -24,8 +26,6 @@ struct DownloadRowView: View {
|
||||
var videoIndex: Int? = nil
|
||||
var loadMoreVideos: LoadMoreVideosCallback? = nil
|
||||
|
||||
@Environment(\.appEnvironment) private var appEnvironment
|
||||
|
||||
// Cache watch progress to avoid CoreData fetches on every re-render
|
||||
@State private var cachedWatchProgress: Double?
|
||||
@State private var cachedWatchedSeconds: TimeInterval?
|
||||
|
||||
Reference in New Issue
Block a user