mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 01:47:33 +08:00
Fix retry count not updating correctly
Regressed with changes to player reference retention logic. Could add a test but the logic is so local now it seems quite redundant.
This commit is contained in:
parent
e848444d74
commit
e0c61f4dc5
@ -309,10 +309,8 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!this.IsCurrentScreen())
|
if (!this.IsCurrentScreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var restartCount = player?.RestartCount + 1 ?? 0;
|
|
||||||
|
|
||||||
player = createPlayer();
|
player = createPlayer();
|
||||||
player.RestartCount = restartCount;
|
player.RestartCount = ++restartCount;
|
||||||
player.RestartRequested = restartRequested;
|
player.RestartRequested = restartRequested;
|
||||||
|
|
||||||
LoadTask = LoadComponentAsync(player, _ => MetadataInfo.Loading = false);
|
LoadTask = LoadComponentAsync(player, _ => MetadataInfo.Loading = false);
|
||||||
@ -428,6 +426,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private Bindable<bool> muteWarningShownOnce;
|
private Bindable<bool> muteWarningShownOnce;
|
||||||
|
|
||||||
|
private int restartCount;
|
||||||
|
|
||||||
private void showMuteWarningIfNeeded()
|
private void showMuteWarningIfNeeded()
|
||||||
{
|
{
|
||||||
if (!muteWarningShownOnce.Value)
|
if (!muteWarningShownOnce.Value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user