mirror of
https://github.com/ppy/osu.git
synced 2025-02-04 01:13:00 +08:00
Update notification text when import is paused due to gameplay
Addresses https://github.com/ppy/osu/discussions/30388.
This commit is contained in:
parent
7df3976d1c
commit
be5cb209e5
@ -105,7 +105,6 @@ namespace osu.Game.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
notification.Progress = 0;
|
notification.Progress = 0;
|
||||||
notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising...";
|
|
||||||
|
|
||||||
int current = 0;
|
int current = 0;
|
||||||
|
|
||||||
@ -113,6 +112,18 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
parameters.Batch |= tasks.Length >= minimum_items_considered_batch_import;
|
parameters.Batch |= tasks.Length >= minimum_items_considered_batch_import;
|
||||||
|
|
||||||
|
// A paused state could obviously be entered mid-import (during the `Task.WhenAll` below),
|
||||||
|
// but in order to keep things simple let's focus on the most common scenario.
|
||||||
|
notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is paused due to gameplay...";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pauseIfNecessary(parameters, notification.CancellationToken);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising...";
|
||||||
|
|
||||||
await Task.WhenAll(tasks.Select(async task =>
|
await Task.WhenAll(tasks.Select(async task =>
|
||||||
{
|
{
|
||||||
if (notification.CancellationToken.IsCancellationRequested)
|
if (notification.CancellationToken.IsCancellationRequested)
|
||||||
|
Loading…
Reference in New Issue
Block a user