Skip to content

Commit 12f4d4a

Browse files
square-tombclaude
andcommitted
fix(mobile): stop the carousel shimmer when Reduce Motion turns on
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Tom Brow <[email protected]>
1 parent 18a586d commit 12f4d4a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎mobile/ios/Runner/IosMediaCarousel.swift‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ private final class CarouselShimmer: UIView {
2525
gradient.locations = [0, 0.34, 0.5, 0.66, 1]
2626
layer.addSublayer(gradient)
2727
updateColors()
28+
NotificationCenter.default.addObserver(
29+
self,
30+
selector: #selector(reduceMotionChanged),
31+
name: UIAccessibility.reduceMotionStatusDidChangeNotification,
32+
object: nil
33+
)
2834
}
35+
@objc private func reduceMotionChanged() { animate() }
2936
required init?(coder: NSCoder) { nil }
3037
override func layoutSubviews() {
3138
super.layoutSubviews()

0 commit comments

Comments
 (0)