mirror of
https://github.com/ppy/osu
synced 2024-12-28 01:42:57 +00:00
Privatise counter again
This commit is contained in:
parent
ee034874bb
commit
2850f6ce95
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics;
|
||||
@ -12,6 +13,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Users;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Testing;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
@ -186,7 +188,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
public void ShowComments(CommentBundle bundle)
|
||||
{
|
||||
CommentCounter.Current.Value = 0;
|
||||
this.ChildrenOfType<TotalCommentsCounter>().Single().Current.Value = 0;
|
||||
ClearComments();
|
||||
OnSuccess(bundle);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Overlays.Comments
|
||||
private FillFlowContainer content;
|
||||
private DeletedCommentsCounter deletedCommentsCounter;
|
||||
private CommentsShowMoreButton moreButton;
|
||||
protected TotalCommentsCounter CommentCounter;
|
||||
private TotalCommentsCounter commentCounter;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
@ -62,7 +62,7 @@ namespace osu.Game.Overlays.Comments
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
CommentCounter = new TotalCommentsCounter(),
|
||||
commentCounter = new TotalCommentsCounter(),
|
||||
new CommentsHeader
|
||||
{
|
||||
Sort = { BindTarget = Sort },
|
||||
@ -143,7 +143,7 @@ namespace osu.Game.Overlays.Comments
|
||||
return;
|
||||
|
||||
// only reset when changing ID/type. other refetch ops are generally just changing sort order.
|
||||
CommentCounter.Current.Value = 0;
|
||||
commentCounter.Current.Value = 0;
|
||||
|
||||
refetchComments();
|
||||
}
|
||||
@ -181,7 +181,7 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
protected void OnSuccess(CommentBundle response)
|
||||
{
|
||||
CommentCounter.Current.Value = response.Total;
|
||||
commentCounter.Current.Value = response.Total;
|
||||
|
||||
if (!response.Comments.Any())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user