Inline complete method as well

For better guarantees that `finalAction` is actually called on the same
screen that `checkCanComplete()` was (uses result of one
`getCurrentScreen()` call throughout instead of calling multiple times).
This commit is contained in:
Bartłomiej Dach 2020-12-31 10:27:42 +01:00
parent f9196ae976
commit 00c6703c51

View File

@ -84,7 +84,8 @@ namespace osu.Game
// we may already be at the target screen type. // we may already be at the target screen type.
if (validScreens.Contains(current.GetType()) && !beatmap.Disabled) if (validScreens.Contains(current.GetType()) && !beatmap.Disabled)
{ {
complete(); finalAction(current);
Cancel();
return; return;
} }
@ -138,11 +139,5 @@ namespace osu.Game
lastEncounteredDialogScreen = current; lastEncounteredDialogScreen = current;
return true; return true;
} }
private void complete()
{
finalAction(getCurrentScreen());
Cancel();
}
} }
} }