mirror of
https://github.com/ppy/osu.git
synced 2025-03-17 17:17:19 +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:
parent
28867fbbb1
commit
2653bd2f99
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user