1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 22:37:20 +08:00

Merge pull request #1948 from peppy/fix-user-download-cancel

Don't show error messages when a download is user-cancelled
This commit is contained in:
Dean Herbert 2018-01-22 17:07:32 +09:00 committed by GitHub
commit 30987f2f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -291,10 +291,12 @@ namespace osu.Game.Beatmaps
}, TaskCreationOptions.LongRunning);
};
request.Failure += data =>
request.Failure += error =>
{
if (error is OperationCanceledException) return;
downloadNotification.State = ProgressNotificationState.Completed;
Logger.Error(data, "Failed to get beatmap download information");
Logger.Error(error, "Beatmap download failed!");
currentDownloads.Remove(request);
};

View File

@ -16,7 +16,6 @@ using osu.Game.Graphics.Sprites;
using OpenTK.Graphics;
using osu.Framework.Input;
using osu.Game.Graphics.UserInterface;
using osu.Framework.Logging;
using osu.Game.Online.API.Requests;
using osu.Framework.Configuration;
using osu.Framework.Audio.Track;
@ -185,7 +184,6 @@ namespace osu.Game.Overlays.Direct
{
progressBar.Current.Value = 0;
progressBar.FadeOut(500);
Logger.Error(e, "Failed to get beatmap download information");
};
request.DownloadProgressed += progress => progressBar.Current.Value = progress;