From 306c2a58e52483abc3851d0dc3b8aaada9f498e2 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 29 May 2023 18:09:48 +0600 Subject: [PATCH] Cancellation token for Animation.RunAsync --- src/Avalonia.Base/Animation/Animation.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Base/Animation/Animation.cs b/src/Avalonia.Base/Animation/Animation.cs index ecf796ac4d..4de89bfe97 100644 --- a/src/Avalonia.Base/Animation/Animation.cs +++ b/src/Avalonia.Base/Animation/Animation.cs @@ -359,7 +359,8 @@ namespace Avalonia.Animation return new CompositeDisposable(subscriptions); } - public Task RunAsync(Animatable control) => RunAsync(control, null); + public Task RunAsync(Animatable control, CancellationToken cancellationToken = default) => + RunAsync(control, null, cancellationToken); /// internal Task RunAsync(Animatable control, IClock? clock)