@@ -26,9 +26,8 @@ internal import _FoundationCollections
26
26
@Observable public final class ProgressManager : Sendable {
27
27
28
28
internal let state : Mutex < State >
29
- internal let additionalPropertiesSink : Void // method 1
30
- internal static let additionalPropertiesKeyPath : Mutex < KeyPath < ProgressManager , Void > > = Mutex ( \ProgressManager . additionalPropertiesSink) // granular support: keypath synthesis
31
- // view debugger in SwiftUI: show that keypath, name it a bit more close to its functionality
29
+ internal let additionalPropertiesSink : Void
30
+ internal static let additionalPropertiesKeyPath : Mutex < KeyPath < ProgressManager , Void > > = Mutex ( \ProgressManager . additionalPropertiesSink)
32
31
33
32
/// The total units of work.
34
33
public var totalCount : Int ? {
@@ -199,25 +198,7 @@ internal import _FoundationCollections
199
198
internal func mutateObservation< T> ( of keyPath: KeyPath < ProgressManager , T > , _ mutation: ( ) -> Void ) {
200
199
_ $observationRegistrar. withMutation ( of: self , keyPath: keyPath, mutation)
201
200
}
202
-
203
- // bad performance
204
- // internal subscript(fakeKeypath fake: MetatypeWrapper<Int, Int>) -> Void {
205
- // _$observationRegistrar.access(self, keyPath: \.[fakeKeypath: fake])
206
- // }
207
-
208
- //MARK: Internal vars to make additional properties observable
209
- // internal var totalFileCount: Int {
210
- // _$observationRegistrar.access(self, keyPath: \.totalFileCount)
211
- // return getUpdatedFileCount(type: .total)
212
- // }
213
- //
214
- // internal var completedFileCount: Int {
215
- // _$observationRegistrar.access(self, keyPath: \.completedFileCount)
216
- // return getUpdatedFileCount(type: .completed)
217
- // }
218
-
219
-
220
-
201
+
221
202
//MARK: Fractional Properties Methods
222
203
internal func getProgressFraction( ) -> ProgressFraction {
223
204
return state. withLock { state in
0 commit comments