Skip to content

Commit

Permalink
Check for IsCancellationRequested when stopping HomePage Carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Nov 21, 2024
1 parent 6e60853 commit 094c61b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public async void CarouselRestartScroll(int delaySeconds = 5)

public async ValueTask CarouselStopScroll()
{
if (!CarouselToken.IsDisposed && !CarouselToken.IsCancelled)
if (!CarouselToken.IsCancellationRequested && !CarouselToken.IsDisposed && !CarouselToken.IsCancelled)
{
await CarouselToken.CancelAsync();
CarouselToken.Dispose();
Expand Down

0 comments on commit 094c61b

Please sign in to comment.