Don't queue export replay operations if button is disabled

This commit is contained in:
Dean Herbert 2023-07-30 16:41:33 +09:00
parent 55cb400674
commit 35ec55c1f6

View File

@ -117,11 +117,17 @@ namespace osu.Game.Screens.Ranking
return true;
case GlobalAction.ExportReplay:
State.BindValueChanged(exportWhenReady, true);
// start the import via button
if (State.Value != DownloadState.LocallyAvailable)
if (State.Value == DownloadState.LocallyAvailable)
{
State.BindValueChanged(exportWhenReady, true);
}
else
{
// A download needs to be performed before we can export this replay.
button.TriggerClick();
if (button.Enabled.Value)
State.BindValueChanged(exportWhenReady, true);
}
return true;
}