mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Always set progress before updating download state
Without doing so, a state change may read from an old progress value.
This commit is contained in:
parent
51ab1dace4
commit
17a0b19ee7
@ -123,13 +123,13 @@ namespace osu.Game.Online
|
|||||||
{
|
{
|
||||||
if (attachedRequest.Progress == 1)
|
if (attachedRequest.Progress == 1)
|
||||||
{
|
{
|
||||||
State.Value = DownloadState.Importing;
|
|
||||||
Progress.Value = 1;
|
Progress.Value = 1;
|
||||||
|
State.Value = DownloadState.Importing;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
State.Value = DownloadState.Downloading;
|
|
||||||
Progress.Value = attachedRequest.Progress;
|
Progress.Value = attachedRequest.Progress;
|
||||||
|
State.Value = DownloadState.Downloading;
|
||||||
|
|
||||||
attachedRequest.Failure += onRequestFailure;
|
attachedRequest.Failure += onRequestFailure;
|
||||||
attachedRequest.DownloadProgressed += onRequestProgress;
|
attachedRequest.DownloadProgressed += onRequestProgress;
|
||||||
|
Loading…
Reference in New Issue
Block a user