1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Fix selector dismissal behaviour during user actions

This commit is contained in:
Jai Sharma 2022-05-09 22:58:46 +01:00
parent ebb64d1f1a
commit 2481201a73

View File

@ -165,7 +165,12 @@ namespace osu.Game.Overlays
};
channelList.OnRequestLeave += channel => channelManager.LeaveChannel(channel);
channelListing.OnRequestJoin += channel => channelManager.JoinChannel(channel);
channelListing.OnRequestJoin += channel =>
{
channelManager.JoinChannel(channel);
// Manually joining a channel should keep the selector open
selectorActive.Value = true;
};
channelListing.OnRequestLeave += channel => channelManager.LeaveChannel(channel);
textBar.OnSearchTermsChanged += searchTerms => channelListing.SearchTerm = searchTerms;
@ -255,6 +260,10 @@ namespace osu.Game.Overlays
// Channel is null when leaving the currently selected channel
if (newChannel == null)
{
// Don't need to autoswitch if the selector is visible
if (selectorActive.Value)
return;
// Find another channel to switch to
newChannel = channelManager.JoinedChannels.FirstOrDefault(c => c != channel.OldValue);