Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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;
        }