mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 13:47:21 +08:00
Merge pull request #12192 from peppy/fix-download-progress-display
Fix multiplayer download progress showing incorrectly after an aborted download
This commit is contained in:
commit
2b07e7bbce
@ -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;
|
||||||
|
@ -45,6 +45,9 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
Progress.BindValueChanged(_ =>
|
Progress.BindValueChanged(_ =>
|
||||||
{
|
{
|
||||||
|
if (State.Value != DownloadState.Downloading)
|
||||||
|
return;
|
||||||
|
|
||||||
// incoming progress changes are going to be at a very high rate.
|
// incoming progress changes are going to be at a very high rate.
|
||||||
// we don't want to flood the network with this, so rate limit how often we send progress updates.
|
// we don't want to flood the network with this, so rate limit how often we send progress updates.
|
||||||
if (progressUpdate?.Completed != false)
|
if (progressUpdate?.Completed != false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user