Skip to content

Commit 4a3923b

Browse files
authored
Revert "UIKit: Skip UIBindable perception checks (pointfreeco#3744)"
This reverts commit 27db3df.
1 parent 5638930 commit 4a3923b

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/ComposableArchitecture/Observation/NavigationStack+Observation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ extension Store {
484484
@_spi(Internals)
485485
public var _isInPerceptionTracking: Bool {
486486
#if DEBUG && !os(visionOS)
487-
return _PerceptionLocals.isInPerceptionTracking || _PerceptionLocals.skipPerceptionChecking
487+
return _PerceptionLocals.isInPerceptionTracking
488488
#else
489489
return false
490490
#endif

Sources/ComposableArchitecture/Observation/Store+Observation.swift

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -403,18 +403,11 @@ extension UIBindable {
403403
column: UInt = #column
404404
) -> UIBinding<Store<ChildState, ChildAction>?>
405405
where Value == Store<State, Action> {
406-
#if DEBUG && canImport(SwiftUI)
407-
let id = _PerceptionLocals.$skipPerceptionChecking.withValue(true) {
408-
wrappedValue.currentState[keyPath: state].flatMap(_identifiableID)
409-
}
410-
#else
411-
let id = wrappedValue.currentState[keyPath: state].flatMap(_identifiableID)
412-
#endif
413-
return self[
414-
id: id,
406+
self[
407+
id: wrappedValue.currentState[keyPath: state].flatMap(_identifiableID),
415408
state: state,
416409
action: action,
417-
isInViewBody: true,
410+
isInViewBody: _isInPerceptionTracking,
418411
fileID: _HashableStaticString(rawValue: fileID),
419412
filePath: _HashableStaticString(rawValue: filePath),
420413
line: line,

0 commit comments

Comments
 (0)