Attach progress immediately

This commit is contained in:
Dean Herbert
2019-01-31 19:08:45 +09:00
parent c54a515b3e
commit b69a19f810
3 changed files with 19 additions and 7 deletions

View File

@ -79,10 +79,20 @@ namespace osu.Game.Overlays.Direct
if (attachedRequest != null)
{
State.Value = DownloadState.Downloading;
attachedRequest.Failure += onRequestFailure;
attachedRequest.DownloadProgressed += onRequestProgress;
attachedRequest.Success += onRequestSuccess;
if (attachedRequest.Progress == 1)
{
State.Value = DownloadState.Downloaded;
Progress.Value = 1;
}
else
{
State.Value = DownloadState.Downloading;
Progress.Value = attachedRequest.Progress;
attachedRequest.Failure += onRequestFailure;
attachedRequest.DownloadProgressed += onRequestProgress;
attachedRequest.Success += onRequestSuccess;
}
}
else
{