Remove flag causing intiialisation to only run once ever

This commit is contained in:
Dean Herbert
2023-01-09 16:38:37 +09:00
parent 13c3d2c254
commit 22d0b34623

View File

@ -71,7 +71,6 @@ namespace osu.Game.Online.Chat
private UserLookupCache users { get; set; }
private readonly IBindable<APIState> apiState = new Bindable<APIState>();
private bool channelsInitialised;
private ScheduledDelegate scheduledAck;
private long? lastSilenceMessageId;
@ -95,15 +94,7 @@ namespace osu.Game.Online.Chat
connector.NewMessages += msgs => Schedule(() => addMessages(msgs));
connector.PresenceReceived += () => Schedule(() =>
{
if (!channelsInitialised)
{
channelsInitialised = true;
// we want this to run after the first presence so we can see if the user is in any channels already.
initializeChannels();
}
});
connector.PresenceReceived += () => Schedule(initializeChannels);
connector.Start();