From 6493f24547bd1eae1ecbfce3edb13f4ac0612d80 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski <megaman9919@gmail.com> Date: Thu, 23 Jan 2020 15:56:01 +0300 Subject: [PATCH] Add TotalCommentsCounter to CommentsContainer --- osu.Game/Overlays/Comments/CommentsContainer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Overlays/Comments/CommentsContainer.cs b/osu.Game/Overlays/Comments/CommentsContainer.cs index 9f1d9d9488..433af5fb4e 100644 --- a/osu.Game/Overlays/Comments/CommentsContainer.cs +++ b/osu.Game/Overlays/Comments/CommentsContainer.cs @@ -38,6 +38,7 @@ namespace osu.Game.Overlays.Comments private readonly FillFlowContainer content; private readonly DeletedChildrenPlaceholder deletedChildrenPlaceholder; private readonly CommentsShowMoreButton moreButton; + private readonly TotalCommentsCounter commentCounter; public CommentsContainer() { @@ -56,6 +57,7 @@ namespace osu.Game.Overlays.Comments Direction = FillDirection.Vertical, Children = new Drawable[] { + commentCounter = new TotalCommentsCounter(), new CommentsHeader { Sort = { BindTarget = Sort }, @@ -133,6 +135,7 @@ namespace osu.Game.Overlays.Comments if (!IsLoaded) return; + commentCounter.Current.Value = 0; refetchComments(); } @@ -199,6 +202,8 @@ namespace osu.Game.Overlays.Comments moreButton.IsLoading = false; } + commentCounter.Current.Value = response.Total; + moreButton.FadeTo(response.HasMore ? 1 : 0); }, loadCancellation.Token); }