1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 14:22:55 +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:
Dan Balasescu 2021-03-26 15:25:25 +09:00 committed by GitHub
commit 2b07e7bbce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -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)