1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

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:
Dan Balasescu 2021-02-26 18:45:54 +09:00 committed by GitHub
commit d7f3519bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,6 +141,13 @@ namespace osu.Game.Database
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...";