Files
ABS-Client/ABS Client/DownloadWidgetExtension/DownloadActivityAttributes.swift
2026-06-08 19:32:18 +02:00

18 lines
684 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import ActivityKit
import Foundation
/// Shared between the main app (to drive the activity lifecycle) and the
/// DownloadWidgetExtension (to render the Lock Screen / Dynamic Island UI).
/// Both targets must compile this exact definition keep them in sync.
struct DownloadActivityAttributes: ActivityAttributes {
/// Item title set once at activity start; never changes during the download.
let itemTitle: String
struct ContentState: Codable, Hashable {
/// Overall fraction across all tracks (0.0 1.0).
var progress: Double
/// Total bytes written to disk so far, shown as "X MB downloaded".
var bytesDownloaded: Int64
}
}