Skip to content

Commit c977d01

Browse files
committed
clean up additional properties observation comments
1 parent 29610fc commit c977d01

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

Sources/FoundationEssentials/ProgressManager/ProgressManager.swift

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ internal import _FoundationCollections
2626
@Observable public final class ProgressManager: Sendable {
2727

2828
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)
3231

3332
/// The total units of work.
3433
public var totalCount: Int? {
@@ -199,25 +198,7 @@ internal import _FoundationCollections
199198
internal func mutateObservation<T>(of keyPath: KeyPath<ProgressManager, T>, _ mutation: () -> Void) {
200199
_$observationRegistrar.withMutation(of: self, keyPath: keyPath, mutation)
201200
}
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+
221202
//MARK: Fractional Properties Methods
222203
internal func getProgressFraction() -> ProgressFraction {
223204
return state.withLock { state in

0 commit comments

Comments
 (0)