1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

Stop import failures from being added to the imported model list (#5262)

Stop import failures from being added to the imported model list
This commit is contained in:
Dean Herbert 2019-07-05 15:13:46 +09:00 committed by GitHub
commit 655e96b2c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,8 @@ namespace osu.Game.Database
lock (imported)
{
imported.Add(model);
if (model != null)
imported.Add(model);
current++;
notification.Text = $"Imported {current} of {paths.Length} {HumanisedModelName}s";
@ -140,7 +141,7 @@ namespace osu.Game.Database
{
notification.CompletionText = imported.Count == 1
? $"Imported {imported.First()}!"
: $"Imported {current} {HumanisedModelName}s!";
: $"Imported {imported.Count} {HumanisedModelName}s!";
if (imported.Count > 0 && PresentImport != null)
{