mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Merge pull request #24419 from peppy/fix-replay-export-queued-op
Fix replay being unexpected exported at results screen after score switch
This commit is contained in:
commit
3e801d8696
@ -83,6 +83,10 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
Score.BindValueChanged(score =>
|
||||
{
|
||||
// An export may be pending from the last score.
|
||||
// Reset this to meet user expectations (a new score which has just been switched to shouldn't export)
|
||||
State.ValueChanged -= exportWhenReady;
|
||||
|
||||
downloadTracker?.RemoveAndDisposeImmediately();
|
||||
|
||||
if (score.NewValue != null)
|
||||
@ -117,11 +121,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user