1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 04:49:34 +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
parent 28867fbbb1
commit 2653bd2f99
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

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);
}
});