diff options
Diffstat (limited to 'DomainDig/TimelineView.swift')
| -rw-r--r-- | DomainDig/TimelineView.swift | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/DomainDig/TimelineView.swift b/DomainDig/TimelineView.swift index 9b79adf..6979ca0 100644 --- a/DomainDig/TimelineView.swift +++ b/DomainDig/TimelineView.swift @@ -168,6 +168,7 @@ private struct TimelineRow: View { } struct TimelineDiffView: View { + @Environment(\.accessibilityReduceMotion) private var reduceMotion @Bindable var viewModel: DomainViewModel let diff: DomainDiff @Binding var focusedSectionID: String? @@ -218,7 +219,7 @@ struct TimelineDiffView: View { private func scroll(proxy: ScrollViewProxy) { guard let focusedSectionID else { return } - withAnimation { + withAnimation(reduceMotion ? nil : .default) { proxy.scrollTo(focusedSectionID, anchor: .top) } } |
