1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

Move PartRoom calls

This commit is contained in:
Dean Herbert 2018-12-26 20:12:51 +09:00
parent 23d412e3ff
commit 6f0d13e36b
2 changed files with 6 additions and 9 deletions

View File

@ -106,20 +106,11 @@ namespace osu.Game.Screens.Multi.Lounge
protected override bool OnExiting(Screen next)
{
roomManager?.PartRoom();
Filter.Search.HoldFocus = false;
// no base call; don't animate
return false;
}
protected override void OnResuming(Screen last)
{
roomManager?.PartRoom();
base.OnResuming(last);
}
protected override void OnSuspending(Screen next)
{
base.OnSuspending(next);

View File

@ -42,6 +42,12 @@ namespace osu.Game.Screens.Multi
TimeBetweenPolls = 5000;
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
PartRoom();
}
public void CreateRoom(Room room, Action<string> onError = null)
{
room.Host.Value = api.LocalUser;