this repo has no description
at main 1.3 kB view raw
1#if os(iOS) 2import ActivityKit 3#endif 4import Foundation 5 6#if os(iOS) 7struct DownloadActivityAttributes: ActivityAttributes { 8 public struct ContentState: Codable, Hashable { 9 var progress: Double 10 var downloadedBlobs: Int 11 var totalBlobs: Int? 12 var accountHandle: String 13 var isPaused: Bool 14 var status: DownloadStatus 15 16 enum DownloadStatus: String, Codable { 17 case fetchingData = "Fetching repository data..." 18 case downloading = "Downloading" 19 case paused = "Paused" 20 case completed = "Completed" 21 } 22 } 23 24 var accountDid: String 25 var accountHandle: String 26} 27#else 28struct DownloadActivityAttributes { 29 public struct ContentState: Codable, Hashable { 30 var progress: Double 31 var downloadedBlobs: Int 32 var totalBlobs: Int? 33 var accountHandle: String 34 var isPaused: Bool 35 var status: DownloadStatus 36 37 enum DownloadStatus: String, Codable { 38 case fetchingData = "Fetching repository data..." 39 case downloading = "Downloading" 40 case paused = "Paused" 41 case completed = "Completed" 42 } 43 } 44 45 var accountDid: String 46 var accountHandle: String 47} 48#endif