mirror of https://github.com/ppy/osu
Merge pull request #11907 from peppy/fix-import-from-stable-no-beatmaps-message
Fix "failed to import" message showing when importing from a stable install with no beatmaps
This commit is contained in:
commit
d7f3519bd7
|
@ -141,6 +141,13 @@ public Task Import(params ImportTask[] tasks)
|
|||
|
||||
protected async Task<IEnumerable<TModel>> Import(ProgressNotification notification, params ImportTask[] tasks)
|
||||
{
|
||||
if (tasks.Length == 0)
|
||||
{
|
||||
notification.CompletionText = $"No {HumanisedModelName}s were found to import!";
|
||||
notification.State = ProgressNotificationState.Completed;
|
||||
return Enumerable.Empty<TModel>();
|
||||
}
|
||||
|
||||
notification.Progress = 0;
|
||||
notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising...";
|
||||
|
||||
|
|
Loading…
Reference in New Issue