1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 20:33:09 +08:00

Fix Disclaimer screen handling user change events after initial display

Unnecessary overhead, but also should resolve a production hard crash.
This commit is contained in:
Dean Herbert 2022-06-16 15:40:17 +09:00
parent e778c90930
commit 89533fa33d

View File

@ -171,6 +171,14 @@ namespace osu.Game.Screens.Menu
((IBindable<APIUser>)currentUser).BindTo(api.LocalUser);
}
public override void OnSuspending(ScreenTransitionEvent e)
{
base.OnSuspending(e);
// Once this screen has finished being displayed, we don't want to unnecessarily handle user change events.
currentUser.UnbindAll();
}
public override void OnEntering(ScreenTransitionEvent e)
{
base.OnEntering(e);