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 {
541541 /// - Parameter property: The `TotalFileCount` property type.
542542 /// - Returns: The sum of all total file counts across the entire progress subtree.
543543 public func summary( of property: ProgressManager . Properties . TotalFileCount . Type ) -> Int {
544- return getUpdatedFileCount ( type: . total)
544+ // return getUpdatedFileCount(type: .total)
545+ return totalFileCount
545546 }
546547
547548 /// Returns the completed file count across the progress subtree.
548549 ///
549550 /// - Parameter property: The `CompletedFileCount` property type.
550551 /// - Returns: The sum of all completed file counts across the entire progress subtree.
551552 public func summary( of property: ProgressManager . Properties . CompletedFileCount . Type ) -> Int {
552- return getUpdatedFileCount ( type: . completed)
553+ // return getUpdatedFileCount(type: .completed)
554+ return completedFileCount
553555 }
554556
555557 /// 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
185185 }
186186 }
187187
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+
188199 //MARK: Fractional Properties Methods
189200 internal func getProgressFraction( ) -> ProgressFraction {
190201 return state. withLock { state in
You can’t perform that action at this time.
0 commit comments