mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Merge pull request #18526 from peppy/fix-tutorial-download-state
Fix tutorial download state not matching correctly when already available locally
This commit is contained in:
commit
c06045f41f
@ -85,6 +85,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
downloadTrackers.Add(beatmapDownloadTracker);
|
||||
AddInternal(beatmapDownloadTracker);
|
||||
|
||||
// Note that this is downloading the beatmaps even if they are already downloaded.
|
||||
// We could rely more on `BeatmapDownloadTracker`'s exposed state to avoid this.
|
||||
beatmapDownloader.Download(beatmapSet);
|
||||
}
|
||||
}
|
||||
|
@ -154,12 +154,15 @@ namespace osu.Game.Overlays.FirstRunSetup
|
||||
|
||||
var downloadTracker = tutorialDownloader.DownloadTrackers.First();
|
||||
|
||||
downloadTracker.State.BindValueChanged(state =>
|
||||
{
|
||||
if (state.NewValue == DownloadState.LocallyAvailable)
|
||||
downloadTutorialButton.Complete();
|
||||
}, true);
|
||||
|
||||
downloadTracker.Progress.BindValueChanged(progress =>
|
||||
{
|
||||
downloadTutorialButton.SetProgress(progress.NewValue, false);
|
||||
|
||||
if (progress.NewValue == 1)
|
||||
downloadTutorialButton.Complete();
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user