From fdf95446882f67ab27621a70ce05095b8ee25216 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 26 Feb 2023 15:28:10 +0900 Subject: [PATCH] cancel handle --- osu.Game/Database/LegacyModelExporter.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/osu.Game/Database/LegacyModelExporter.cs b/osu.Game/Database/LegacyModelExporter.cs index 4ac48aaa09..b47e0a9913 100644 --- a/osu.Game/Database/LegacyModelExporter.cs +++ b/osu.Game/Database/LegacyModelExporter.cs @@ -137,6 +137,12 @@ namespace osu.Game.Database }); }, cancellationToken).ContinueWith(t => { + if (cancellationToken.IsCancellationRequested) + { + notify.State = ProgressNotificationState.Cancelled; + return false; + } + if (t.IsFaulted) { notify.State = ProgressNotificationState.Cancelled; @@ -144,10 +150,8 @@ namespace osu.Game.Database return false; } - notify.CompletionText = "Export Complete, Click to open the folder"; - notify.State = ProgressNotificationState.Completed; return true; - }, cancellationToken); + }, CancellationToken.None); } ///