Refactor views

This commit is contained in:
Arkadiusz Fal
2026-02-09 01:13:02 +01:00
parent 8464464199
commit 612dce6b9f
43 changed files with 143 additions and 125 deletions

View File

@@ -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?