<commit_before>﻿// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using Humanizer;

namespace osu.Game.Overlays.Comments.Buttons
{
    public class ShowRepliesButton : CommentRepliesButton
    {
        private readonly int count;

        public ShowRepliesButton(int count)
        {
            this.count = count;
        }

        protected override string GetText() => "reply".ToQuantity(count);
    }
}<commit_msg>Make Icon rotate when clicking ShowRepliesButton<commit_after>﻿// Copyright (c) p<NAME> Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using Humanizer;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osuTK;

namespace osu.Game.Overlays.Comments.Buttons
{
    public class ShowRepliesButton : CommentRepliesButton
    {
        public readonly BindableBool Expanded = new BindableBool(true);

        private readonly int count;

        public ShowRepliesButton(int count)
        {
            this.count = count;
        }

        protected override void LoadComplete()
        {
            base.LoadComplete();
            Expanded.BindValueChanged(onExpandedChanged, true);
        }

        private void onExpandedChanged(ValueChangedEvent<bool> expanded)
        {
            Icon.ScaleTo(new Vector2(1, expanded.NewValue ? -1 : 1));
        }

        protected override bool OnClick(ClickEvent e)
        {
            Expanded.Toggle();
            return base.OnClick(e);
        }

        protected override string GetText() => "reply".ToQuantity(count);
    }
}
{'fraction_non_alphanumeric': 0.08677926616191031, 'fraction_numerical': 0.0023296447291788003, 'mean_word_length': 2.5643153526970957, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '1367821', 'n_tokens_mistral': 481, 'n_tokens_neox': 471, 'n_words': 134}