private void removeChannel(Channel channel) { if (channel == null) { return; } if (channel == CurrentChannel) { CurrentChannel = null; } careChannels.Remove(channel); loadedChannels.Remove(loadedChannels.Find(c => c.Channel == channel)); channelTabs.RemoveItem(channel); channel.Joined.Value = false; }
private void removeChannel(Channel channel) { if (channel == null) { return; } if (channel == CurrentChannel) { CurrentChannel = null; } careChannels.Remove(channel); loadedChannels.Remove(loadedChannels.Find(c => c.Channel == channel)); channelTabs.RemoveItem(channel); api.Queue(new LeaveChannelRequest(channel, api.LocalUser)); channel.Joined.Value = false; }