mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Apply same comment & reworded condition to suspend too
This commit is contained in:
parent
741ee84ed6
commit
62d1774407
@ -133,7 +133,7 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
|
||||
Debug.Assert(screenStack.CurrentScreen != null);
|
||||
|
||||
// if a subscreen was pushed to the nested stack while this screen was not present, this path will proxy `OnResuming()`
|
||||
// if a subscreen was pushed to the nested stack while the stack was not present, this path will proxy `OnResuming()`
|
||||
// to the subscreen before `OnEntering()` can even be called for the subscreen, breaking ordering expectations.
|
||||
// to work around this, do not proxy resume to screens that haven't loaded yet.
|
||||
if ((screenStack.CurrentScreen as Drawable)?.IsLoaded == true)
|
||||
@ -149,7 +149,10 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
|
||||
Debug.Assert(screenStack.CurrentScreen != null);
|
||||
|
||||
if (screenStack.CurrentScreen.IsCurrentScreen())
|
||||
// if a subscreen was pushed to the nested stack while the stack was not present, this path will proxy `OnSuspending()`
|
||||
// to the subscreen before `OnEntering()` can even be called for the subscreen, breaking ordering expectations.
|
||||
// to work around this, do not proxy suspend to screens that haven't loaded yet.
|
||||
if ((screenStack.CurrentScreen as Drawable)?.IsLoaded == true)
|
||||
screenStack.CurrentScreen.OnSuspending(e);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user