File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Sources/FoundationEssentials/ProgressManager Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -541,15 +541,17 @@ extension ProgressManager {
541
541
/// - Parameter property: The `TotalFileCount` property type.
542
542
/// - Returns: The sum of all total file counts across the entire progress subtree.
543
543
public func summary( of property: ProgressManager . Properties . TotalFileCount . Type ) -> Int {
544
- return getUpdatedFileCount ( type: . total)
544
+ // return getUpdatedFileCount(type: .total)
545
+ return totalFileCount
545
546
}
546
547
547
548
/// Returns the completed file count across the progress subtree.
548
549
///
549
550
/// - Parameter property: The `CompletedFileCount` property type.
550
551
/// - Returns: The sum of all completed file counts across the entire progress subtree.
551
552
public func summary( of property: ProgressManager . Properties . CompletedFileCount . Type ) -> Int {
552
- return getUpdatedFileCount ( type: . completed)
553
+ // return getUpdatedFileCount(type: .completed)
554
+ return completedFileCount
553
555
}
554
556
555
557
/// Returns the total byte count across the progress subtree.
Original file line number Diff line number Diff line change @@ -185,6 +185,17 @@ internal import _FoundationCollections
185
185
}
186
186
}
187
187
188
+ //MARK: Internal vars to make additional properties observable
189
+ internal var totalFileCount : Int {
190
+ _ $observationRegistrar. access ( self , keyPath: \. totalFileCount)
191
+ return getUpdatedFileCount ( type: . total)
192
+ }
193
+
194
+ internal var completedFileCount : Int {
195
+ _ $observationRegistrar. access ( self , keyPath: \. completedFileCount)
196
+ return getUpdatedFileCount ( type: . completed)
197
+ }
198
+
188
199
//MARK: Fractional Properties Methods
189
200
internal func getProgressFraction( ) -> ProgressFraction {
190
201
return state. withLock { state in
You can’t perform that action at this time.
0 commit comments