This one is quite dumb.
`OsuGame` uses
[`loadComponentSingleFile`](https://github.com/ppy/osu/blob/15878f7f9fc7088494d3b66e98a7bc1004a1a06d/osu.Game/OsuGame.cs#L1228)
to load the `ChannelManager`. Importantly, this process does _not_ add
the component to any place in the hierarchy where it would normally be
disposed - this includes `InternalChildren`, but _also_ a lesser known
list of [currently-loading
components](https://github.com/ppy/osu-framework/blob/cfb0d7b4b673583f0cf56273e94352769aa5bc9a/osu.Framework/Graphics/Containers/CompositeDrawable.cs#L316-L323)
(those which have been sent through a `LoadComponentAsync` call).
The end result of this is that, `ChannelManager` creates the
`IChatClient` in its constructor, expecting to be able to dispose it,
but `Dispose` is never called!
And the failure case here is that `PollingChatClient` creates a
background task to continuously poll the API, unfortunately keeping a
reference to the rest of the world in the process.
This is a prerequisite for https://github.com/ppy/osu/pull/25480.
The `WebSocketNotificationsClient` was tightly coupled to chat specifics
making it difficult to use in the second factor verification flow.
This commit's goal is to separate the websocket connection and message
handling concerns from specific chat logic concerns.
I don't have a solid way to repro the issue, but this should hopefully
help in resolving it. Either way, I think this change brings more
correct behaviour (if a websocket message comes through that we have
left the channel, I don't believe we should be sending a request to
leave that channel again).
Add dummy channel `DummySelectorChannel` which should be set as the
current channel in the channel manager when the selector in the chat
overlay should be shown.
Refactors the `ChannelListItem` to not show mention pill and close
button when the channel is the dummy selector channel.
Ensure that the `ChannelList` selects the dummy channel on clicking the
selector item.
Removes `ChannelListSelector` as it is no longer needed.
Removes the `setCurrent` parameter from `ChannelManager.JoinChannel`
method as it is no longer needed.
This can happen if the user leaves the channel before the request is
fired. You can't mark a channel as read when you're not in the channel.
Addresses https://github.com/ppy/osu/discussions/16973.