<commit_before>// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using System;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat;

namespace osu.Game.Overlays.Chat
{
    public class ChannelListItem : ClickableContainer, IFilterable
    {
        private const float width_padding = 5;
        private const float channel_width = 150;
        private const float text_size = 15;
        private const float transition_duration = 100;

        private readonly OsuSpriteText topic;
        private readonly OsuSpriteText name;
        private readonly TextAwesome joinedCheckmark;

        private Color4? joinedColour;
        private Color4? topicColour;

        public string[] FilterTerms => new[] { Channel.Name };
        public bool MatchingCurrentFilter
        {
        	set
            {
                FadeTo(value ? 1f : 0f, 100);
            }
        }

        public Action<Channel> OnRequestJoin;
        public Action<Channel> OnRequestLeave;

        private Channel channel;
        public Channel Channel
        {
            get { return channel; }
            set
            {
                if (value == channel) return;
                if (channel != null) channel.Joined.ValueChanged -= updateColour;
                channel = value;

                name.Text = Channel.ToString();
                topic.Text = Channel.Topic;
                channel.Joined.ValueChanged += updateColour;
                updateColour(Channel.Joined);
            }
        }<commit_msg>Tab character<commit_after>// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using System;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat;

namespace osu.Game.Overlays.Chat
{
    public class ChannelListItem : ClickableContainer, IFilterable
    {
        private const float width_padding = 5;
        private const float channel_width = 150;
        private const float text_size = 15;
        private const float transition_duration = 100;

        private readonly OsuSpriteText topic;
        private readonly OsuSpriteText name;
        private readonly TextAwesome joinedCheckmark;

        private Color4? joinedColour;
        private Color4? topicColour;

        public string[] FilterTerms => new[] { Channel.Name };
        public bool MatchingCurrentFilter
        {
            set
            {
                FadeTo(value ? 1f : 0f, 100);
            }
        }

        public Action<Channel> OnRequestJoin;
        public Action<Channel> OnRequestLeave;

        private Channel channel;
        public Channel Channel
        {
            get { return channel; }
            set
            {
                if (value == channel) return;
                if (channel != null) channel.Joined.ValueChanged -= updateColour;
                channel = value;

                name.Text = Channel.ToString();
                topic.Text = Channel.Topic;
                channel.Joined.ValueChanged += updateColour;
                updateColour(Channel.Joined);
            }
        }
{'fraction_non_alphanumeric': 0.07963852019203614, 'fraction_numerical': 0.013555492798644452, 'mean_word_length': 2.0613656006914436, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6974668', 'n_tokens_mistral': 993, 'n_tokens_neox': 915, 'n_words': 249}