1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-30 02:29:55 +08:00

Make notification cannot cancel when Saving Zip Archive

This operation cannot be stopped(if not dispose stream).
so make it cannot cancel
This commit is contained in:
cdwcgt
2022-11-19 12:57:56 +09:00
Unverified
parent 28867fbbb1
commit 2653bd2f99
+4
View File
@@ -56,6 +56,9 @@ namespace osu.Game.Database
/// <returns></returns>
public virtual async Task ExportASync(IHasGuidPrimaryKey uuid)
{
bool canCancel = true;
Notification.CancelRequested += () => canCancel;
Guid id = uuid.ID;
await Task.Run(() =>
{
@@ -91,6 +94,7 @@ namespace osu.Game.Database
}
Notification.Text = "Saving Zip Archive...";
canCancel = false;
archive.SaveTo(OutputStream);
}
});