diff --git a/Application.Avalonia/Controls/ScrollViewerExtensions.cs b/Application.Avalonia/Controls/ScrollViewerExtensions.cs index 6185e3e..c221df9 100644 --- a/Application.Avalonia/Controls/ScrollViewerExtensions.cs +++ b/Application.Avalonia/Controls/ScrollViewerExtensions.cs @@ -169,7 +169,6 @@ void OnPointerPressed(object? sender, RoutedEventArgs e) => animator?.Cancel(); void OnPointerWheelChanged(object? sender, RoutedEventArgs e) => animator?.Cancel(); - var extentChangedObserverToken = scrollViewer.GetObservable(ScrollViewer.ExtentProperty).Subscribe(_ => animator?.Cancel()); var viewportChangedObserverToken = scrollViewer.GetObservable(ScrollViewer.ViewportProperty).Subscribe(_ => animator?.Cancel()); animator = new DoubleAnimator(0, 1).Also(it => { @@ -182,7 +181,6 @@ void OnPointerWheelChanged(object? sender, RoutedEventArgs e) => } scrollViewer.RemoveHandler(ScrollViewer.PointerPressedEvent, OnPointerPressed); scrollViewer.RemoveHandler(ScrollViewer.PointerWheelChangedEvent, OnPointerWheelChanged); - extentChangedObserverToken.Dispose(); viewportChangedObserverToken.Dispose(); }; it.Completed += (_, _) => @@ -195,7 +193,6 @@ void OnPointerWheelChanged(object? sender, RoutedEventArgs e) => } scrollViewer.RemoveHandler(ScrollViewer.PointerPressedEvent, OnPointerPressed); scrollViewer.RemoveHandler(ScrollViewer.PointerWheelChangedEvent, OnPointerWheelChanged); - extentChangedObserverToken.Dispose(); viewportChangedObserverToken.Dispose(); }; it.Duration = duration;