mirror of
https://github.com/osukey/osukey.git
synced 2025-05-02 20:27:27 +09:00
Move scheduler call to inside method itself for added safety
This commit is contained in:
parent
29e8e5ab94
commit
cfe3218239
@ -101,7 +101,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
beatmapDifficulty?.UnbindAll();
|
beatmapDifficulty?.UnbindAll();
|
||||||
beatmapDifficulty = difficultyManager.GetBindableDifficulty(beatmap.BeatmapInfo, cancellationSource.Token);
|
beatmapDifficulty = difficultyManager.GetBindableDifficulty(beatmap.BeatmapInfo, cancellationSource.Token);
|
||||||
beatmapDifficulty.BindValueChanged(_ => Schedule(updateDisplay));
|
beatmapDifficulty.BindValueChanged(_ => updateDisplay());
|
||||||
|
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
}
|
}
|
||||||
@ -112,6 +112,10 @@ namespace osu.Game.Screens.Select
|
|||||||
private BufferedWedgeInfo loadingInfo;
|
private BufferedWedgeInfo loadingInfo;
|
||||||
|
|
||||||
private void updateDisplay()
|
private void updateDisplay()
|
||||||
|
{
|
||||||
|
Scheduler.AddOnce(perform);
|
||||||
|
|
||||||
|
void perform()
|
||||||
{
|
{
|
||||||
void removeOldInfo()
|
void removeOldInfo()
|
||||||
{
|
{
|
||||||
@ -141,6 +145,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Add(Info = loaded);
|
Add(Info = loaded);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user