1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 01:07:23 +08:00

Prevent closing team chat channels via Ctrl-W

As pointed out in
https://github.com/ppy/osu/pull/32079#issuecomment-2680297760.

The comment suggested putting that logic in `ChannelManager` but
honestly I kinda don't see it working out. It'd probably be multiple
boolean arguments for `leaveChannel()` (because `sendLeaveRequest` or
whatever already exists), and then there's this one usage in tournament
client:

	31aded6971/osu.Game.Tournament/Components/TournamentMatchChatDisplay.cs (L57-L58)

I'm not sure how that would interact with this particular change, but I
think there is a nonzero possibility that it would interact badly. So in
general I kinda just prefer steering clear of all that and adding a
local one-liner.
This commit is contained in:
Bartłomiej Dach 2025-02-26 12:01:30 +01:00
parent 31aded6971
commit f3632a466f
No known key found for this signature in database

View File

@ -228,6 +228,7 @@ namespace osu.Game.Overlays
return true;
case PlatformAction.DocumentClose:
if (currentChannel.Value?.Type != ChannelType.Team)
channelManager.LeaveChannel(currentChannel.Value);
return true;