1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 03:02:55 +08:00

Fix replay download button always being disabled when initial score's replay is unavailable

This commit is contained in:
Joehu 2020-08-29 09:33:01 -07:00
parent 69fae0f412
commit 0a643fd5e5

View File

@ -74,6 +74,19 @@ namespace osu.Game.Screens.Ranking
{
button.State.Value = state.NewValue;
updateTooltip();
}, true);
Model.BindValueChanged(_ =>
{
button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
updateTooltip();
}, true);
}
private void updateTooltip()
{
switch (replayAvailability)
{
case ReplayAvailability.Local:
@ -88,9 +101,6 @@ namespace osu.Game.Screens.Ranking
button.TooltipText = @"replay unavailable";
break;
}
}, true);
button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
}
private enum ReplayAvailability