mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 04:33: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)
|
||||
{
|
||||
State.Value = DownloadState.Importing;
|
||||
Progress.Value = 1;
|
||||
State.Value = DownloadState.Importing;
|
||||
}
|
||||
else
|
||||
{
|
||||
State.Value = DownloadState.Downloading;
|
||||
Progress.Value = attachedRequest.Progress;
|
||||
State.Value = DownloadState.Downloading;
|
||||
|
||||
attachedRequest.Failure += onRequestFailure;
|
||||
attachedRequest.DownloadProgressed += onRequestProgress;
|
||||
|
@ -45,6 +45,9 @@ namespace osu.Game.Online.Rooms
|
||||
|
||||
Progress.BindValueChanged(_ =>
|
||||
{
|
||||
if (State.Value != DownloadState.Downloading)
|
||||
return;
|
||||
|
||||
// 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.
|
||||
if (progressUpdate?.Completed != false)
|
||||
|
Loading…
Reference in New Issue
Block a user