mirror of
https://github.com/ppy/osu.git
synced 2025-03-12 18:47:19 +08:00
Remove unnecessary async state machine
This commit is contained in:
parent
772dd0287e
commit
beaced3211
@ -806,11 +806,11 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="score">The <see cref="Score"/> to import.</param>
|
/// <param name="score">The <see cref="Score"/> to import.</param>
|
||||||
/// <returns>The imported score.</returns>
|
/// <returns>The imported score.</returns>
|
||||||
protected virtual async Task ImportScore(Score score)
|
protected virtual Task ImportScore(Score score)
|
||||||
{
|
{
|
||||||
// Replays are already populated and present in the game's database, so should not be re-imported.
|
// Replays are already populated and present in the game's database, so should not be re-imported.
|
||||||
if (DrawableRuleset.ReplayScore != null)
|
if (DrawableRuleset.ReplayScore != null)
|
||||||
return;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
LegacyByteArrayReader replayReader;
|
LegacyByteArrayReader replayReader;
|
||||||
|
|
||||||
@ -820,7 +820,7 @@ namespace osu.Game.Screens.Play
|
|||||||
replayReader = new LegacyByteArrayReader(stream.ToArray(), "replay.osr");
|
replayReader = new LegacyByteArrayReader(stream.ToArray(), "replay.osr");
|
||||||
}
|
}
|
||||||
|
|
||||||
await scoreManager.Import(score.ScoreInfo, replayReader);
|
return scoreManager.Import(score.ScoreInfo, replayReader);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user