1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 14:13:18 +08:00

Childs -> Children

This commit is contained in:
Andrei Zavatski 2019-10-15 00:32:21 +03:00
parent 0676c880b5
commit 09621f066e
6 changed files with 20 additions and 20 deletions

View File

@ -21,8 +21,8 @@ namespace osu.Game.Tests.Visual.Online
typeof(DrawableComment), typeof(DrawableComment),
typeof(HeaderButton), typeof(HeaderButton),
typeof(SortTabControl), typeof(SortTabControl),
typeof(ShowChildsButton), typeof(ShowChildrenButton),
typeof(DeletedChildsPlaceholder) typeof(DeletedChildrenPlaceholder)
}; };
protected override bool UseOnlineAPI => true; protected override bool UseOnlineAPI => true;

View File

@ -78,7 +78,7 @@ namespace osu.Game.Online.API.Requests.Responses
return WebUtility.HtmlDecode(Regex.Replace(MessageHtml, @"<(.|\n)*?>", string.Empty)); return WebUtility.HtmlDecode(Regex.Replace(MessageHtml, @"<(.|\n)*?>", string.Empty));
} }
public int GetDeletedChildsCount() public int GetDeletedChildrenCount()
{ {
int count = 0; int count = 0;

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Comments
private readonly Box background; private readonly Box background;
private readonly FillFlowContainer content; private readonly FillFlowContainer content;
private readonly DeletedChildsPlaceholder deletedChildsPlaceholder; private readonly DeletedChildrenPlaceholder deletedChildrenPlaceholder;
private readonly CommentsShowMoreButton moreButton; private readonly CommentsShowMoreButton moreButton;
public CommentsContainer(CommentableType type, long id) public CommentsContainer(CommentableType type, long id)
@ -87,7 +87,7 @@ namespace osu.Game.Overlays.Comments
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Children = new Drawable[] Children = new Drawable[]
{ {
deletedChildsPlaceholder = new DeletedChildsPlaceholder deletedChildrenPlaceholder = new DeletedChildrenPlaceholder
{ {
ShowDeleted = { BindTarget = ShowDeleted } ShowDeleted = { BindTarget = ShowDeleted }
}, },
@ -126,7 +126,7 @@ namespace osu.Game.Overlays.Comments
{ {
currentPage = 1; currentPage = 1;
loadedTopLevelComments = 0; loadedTopLevelComments = 0;
deletedChildsPlaceholder.DeletedCount.Value = 0; deletedChildrenPlaceholder.DeletedCount.Value = 0;
moreButton.IsLoading = true; moreButton.IsLoading = true;
content.Clear(); content.Clear();
} }
@ -170,7 +170,7 @@ namespace osu.Game.Overlays.Comments
deletedComments++; deletedComments++;
}); });
deletedChildsPlaceholder.DeletedCount.Value = initial ? deletedComments : deletedChildsPlaceholder.DeletedCount.Value + deletedComments; deletedChildrenPlaceholder.DeletedCount.Value = initial ? deletedComments : deletedChildrenPlaceholder.DeletedCount.Value + deletedComments;
if (response.HasMore) if (response.HasMore)
{ {

View File

@ -10,7 +10,7 @@ using osu.Framework.Bindables;
namespace osu.Game.Overlays.Comments namespace osu.Game.Overlays.Comments
{ {
public class DeletedChildsPlaceholder : FillFlowContainer public class DeletedChildrenPlaceholder : FillFlowContainer
{ {
public readonly BindableBool ShowDeleted = new BindableBool(); public readonly BindableBool ShowDeleted = new BindableBool();
public readonly BindableInt DeletedCount = new BindableInt(); public readonly BindableInt DeletedCount = new BindableInt();
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Comments
private readonly SpriteText countText; private readonly SpriteText countText;
public DeletedChildsPlaceholder() public DeletedChildrenPlaceholder()
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Direction = FillDirection.Horizontal; Direction = FillDirection.Horizontal;

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Comments
public readonly BindableBool ShowDeleted = new BindableBool(); public readonly BindableBool ShowDeleted = new BindableBool();
private readonly BindableBool childExpanded = new BindableBool(true); private readonly BindableBool childrenExpanded = new BindableBool(true);
private readonly FillFlowContainer childCommentsVisibilityContainer; private readonly FillFlowContainer childCommentsVisibilityContainer;
private readonly Comment comment; private readonly Comment comment;
@ -34,7 +34,7 @@ namespace osu.Game.Overlays.Comments
{ {
LinkFlowContainer username; LinkFlowContainer username;
FillFlowContainer childCommentsContainer; FillFlowContainer childCommentsContainer;
DeletedChildsPlaceholder deletedChildsPlaceholder; DeletedChildrenPlaceholder deletedChildrenPlaceholder;
FillFlowContainer info; FillFlowContainer info;
LinkFlowContainer message; LinkFlowContainer message;
GridContainer content; GridContainer content;
@ -147,7 +147,7 @@ namespace osu.Game.Overlays.Comments
}, },
new RepliesButton(comment.RepliesCount) new RepliesButton(comment.RepliesCount)
{ {
Expanded = { BindTarget = childExpanded } Expanded = { BindTarget = childrenExpanded }
}, },
} }
} }
@ -171,7 +171,7 @@ namespace osu.Game.Overlays.Comments
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical Direction = FillDirection.Vertical
}, },
deletedChildsPlaceholder = new DeletedChildsPlaceholder deletedChildrenPlaceholder = new DeletedChildrenPlaceholder
{ {
ShowDeleted = { BindTarget = ShowDeleted } ShowDeleted = { BindTarget = ShowDeleted }
} }
@ -180,7 +180,7 @@ namespace osu.Game.Overlays.Comments
} }
}; };
deletedChildsPlaceholder.DeletedCount.Value = comment.GetDeletedChildsCount(); deletedChildrenPlaceholder.DeletedCount.Value = comment.GetDeletedChildrenCount();
if (comment.UserId.HasValue) if (comment.UserId.HasValue)
username.AddUserLink(comment.User); username.AddUserLink(comment.User);
@ -231,7 +231,7 @@ namespace osu.Game.Overlays.Comments
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,
Margin = new MarginPadding { Right = 30, Top = margin }, Margin = new MarginPadding { Right = 30, Top = margin },
Expanded = { BindTarget = childExpanded } Expanded = { BindTarget = childrenExpanded }
}); });
} }
} }
@ -245,7 +245,7 @@ namespace osu.Game.Overlays.Comments
protected override void LoadComplete() protected override void LoadComplete()
{ {
ShowDeleted.BindValueChanged(onShowDeletedChanged, true); ShowDeleted.BindValueChanged(onShowDeletedChanged, true);
childExpanded.BindValueChanged(expanded => childCommentsVisibilityContainer.FadeTo(expanded.NewValue ? 1 : 0), true); childrenExpanded.BindValueChanged(expanded => childCommentsVisibilityContainer.FadeTo(expanded.NewValue ? 1 : 0), true);
base.LoadComplete(); base.LoadComplete();
} }
@ -255,7 +255,7 @@ namespace osu.Game.Overlays.Comments
this.FadeTo(show.NewValue ? 1 : 0); this.FadeTo(show.NewValue ? 1 : 0);
} }
private class ChevronButton : ShowChildsButton private class ChevronButton : ShowChildrenButton
{ {
private readonly SpriteIcon icon; private readonly SpriteIcon icon;
@ -275,7 +275,7 @@ namespace osu.Game.Overlays.Comments
} }
} }
private class RepliesButton : ShowChildsButton private class RepliesButton : ShowChildrenButton
{ {
private readonly SpriteText text; private readonly SpriteText text;
private readonly int count; private readonly int count;

View File

@ -8,11 +8,11 @@ using osu.Framework.Bindables;
namespace osu.Game.Overlays.Comments namespace osu.Game.Overlays.Comments
{ {
public abstract class ShowChildsButton : OsuHoverContainer public abstract class ShowChildrenButton : OsuHoverContainer
{ {
public readonly BindableBool Expanded = new BindableBool(true); public readonly BindableBool Expanded = new BindableBool(true);
protected ShowChildsButton() protected ShowChildrenButton()
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
} }