mirror of
https://github.com/ppy/osu.git
synced 2025-03-10 21:40:34 +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:
parent
31aded6971
commit
f3632a466f
@ -228,7 +228,8 @@ namespace osu.Game.Overlays
|
||||
return true;
|
||||
|
||||
case PlatformAction.DocumentClose:
|
||||
channelManager.LeaveChannel(currentChannel.Value);
|
||||
if (currentChannel.Value?.Type != ChannelType.Team)
|
||||
channelManager.LeaveChannel(currentChannel.Value);
|
||||
return true;
|
||||
|
||||
case PlatformAction.TabRestore:
|
||||
|
Loading…
x
Reference in New Issue
Block a user