mirror of
https://github.com/ppy/osu.git
synced 2026-06-02 07:29:54 +08:00
Add comment and use full conditional similar to extension method
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
b3c2d120bf
commit
741ee84ed6
@@ -133,7 +133,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 this screen 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)
|
||||
screenStack.CurrentScreen.OnResuming(e);
|
||||
|
||||
base.OnResuming(e);
|
||||
|
||||
Reference in New Issue
Block a user