The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): Duo scroll views recheck their bleed after a fold (#37571)
Julius Marminge committed
Nov 16, 2026 at 07:37 UTC
ab8ff33a16c796b48177481adf2167e2aab693fb
1 file changed
+28
apps/mobile/modules/t3-native-controls/ios/T3ScrollEdgeBleedView.swift
+28
@@ -20,6 +20,10 @@ final class T3ScrollEdgeBleedView: ExpoView {
20
/// React Native's clipping, saved while bleeding. React Native only rewrites it when the
21
/// `overflow` style changes, so it stays off while bleeding.
22
private var containerClipped: Bool?
23
+ /// The bar's side is read from the root view controller, whose traits can settle after this
24
+ /// view's own during a fold; with no size change after that, nothing else would recheck.
25
+ private weak var observedWindow: UIWindow?
26
+ private var windowTraitRegistration: (any UITraitChangeRegistration)?
27
28
required init(appContext: AppContext? = nil) {
29
super.init(appContext: appContext)
@@ -38,9 +42,33 @@ final class T3ScrollEdgeBleedView: ExpoView {
42
43
override func didMoveToWindow() {
44
super.didMoveToWindow()
45
+ observeWindowTraits()
46
if window == nil { detach() } else { setNeedsLayout() }
47
}
48
49
+ override func safeAreaInsetsDidChange() {
50
+ super.safeAreaInsetsDidChange()
51
+ setNeedsLayout()
52
+ }
53
+
54
+ private func observeWindowTraits() {
55
+ guard observedWindow !== window else { return }
56
+ if let observedWindow, let windowTraitRegistration {
57
+ observedWindow.unregisterForTraitChanges(windowTraitRegistration)
58
+ }
59
+ observedWindow = window
60
+ windowTraitRegistration = nil
61
+ #if canImport(UIKit, _version: 9127.0.85)
62
+ if #available(iOS 27.1, *), let window {
63
+ windowTraitRegistration = window.registerForTraitChanges(
64
+ UITraitCollection.systemTraitsAffectingVerticalBarEdge
65
+ ) { [weak self] (_: UIWindow, _: UITraitCollection) in
66
+ self?.setNeedsLayout()
67
+ }
68
+ }
69
+ #endif
70
+ }
71
+
72
override func didAddSubview(_ subview: UIView) {
73
super.didAddSubview(subview)
74
setNeedsLayout()