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:
Dean Herbert 2021-03-31 13:57:57 +09:00
parent e848444d74
commit e0c61f4dc5

View File

@ -309,10 +309,8 @@ namespace osu.Game.Screens.Play
if (!this.IsCurrentScreen())
return;
var restartCount = player?.RestartCount + 1 ?? 0;
player = createPlayer();
player.RestartCount = restartCount;
player.RestartCount = ++restartCount;
player.RestartRequested = restartRequested;
LoadTask = LoadComponentAsync(player, _ => MetadataInfo.Loading = false);
@ -428,6 +426,8 @@ namespace osu.Game.Screens.Play
private Bindable<bool> muteWarningShownOnce;
private int restartCount;
private void showMuteWarningIfNeeded()
{
if (!muteWarningShownOnce.Value)