mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 23:42:55 +08:00
Dismiss popovers on returning to lounge
This commit is contained in:
parent
c5319c06c2
commit
4dea2d9778
@ -7,6 +7,7 @@ using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -244,5 +245,11 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
if (roomManager != null)
|
||||
roomManager.RoomsUpdated -= updateSorting;
|
||||
}
|
||||
|
||||
public void HideAnyPopovers()
|
||||
{
|
||||
// must be called on a child of the PopoverContainer due to parent traversal not considering self.
|
||||
roomFlow.HidePopover();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,10 +46,11 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
[CanBeNull]
|
||||
private IDisposable joiningRoomOperation { get; set; }
|
||||
|
||||
private RoomsContainer roomsContainer;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
RoomsContainer roomsContainer;
|
||||
OsuScrollContainer scrollContainer;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
@ -165,6 +166,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
{
|
||||
base.OnSuspending(next);
|
||||
filter.HoldFocus = false;
|
||||
|
||||
// ensure any password prompt is dismissed.
|
||||
roomsContainer.HideAnyPopovers();
|
||||
}
|
||||
|
||||
public void Join(Room room, string password)
|
||||
|
Loading…
Reference in New Issue
Block a user