mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Allow better async support for CommentsContainer
This commit is contained in:
@ -30,22 +30,22 @@ namespace osu.Game.Overlays.Comments
|
|||||||
private CancellationTokenSource loadCancellation;
|
private CancellationTokenSource loadCancellation;
|
||||||
private int currentPage;
|
private int currentPage;
|
||||||
|
|
||||||
private readonly Box background;
|
private FillFlowContainer content;
|
||||||
private readonly Box footerBackground;
|
private DeletedChildrenPlaceholder deletedChildrenPlaceholder;
|
||||||
private readonly FillFlowContainer content;
|
private CommentsShowMoreButton moreButton;
|
||||||
private readonly DeletedChildrenPlaceholder deletedChildrenPlaceholder;
|
private TotalCommentsCounter commentCounter;
|
||||||
private readonly CommentsShowMoreButton moreButton;
|
|
||||||
private readonly TotalCommentsCounter commentCounter;
|
|
||||||
|
|
||||||
public CommentsContainer()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
AddRangeInternal(new Drawable[]
|
AddRangeInternal(new Drawable[]
|
||||||
{
|
{
|
||||||
background = new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = colourProvider.Background5
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -72,9 +72,10 @@ namespace osu.Game.Overlays.Comments
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
footerBackground = new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = colourProvider.Background4
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -109,13 +110,6 @@ namespace osu.Game.Overlays.Comments
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OverlayColourProvider colourProvider)
|
|
||||||
{
|
|
||||||
background.Colour = colourProvider.Background5;
|
|
||||||
footerBackground.Colour = colourProvider.Background4;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
Sort.BindValueChanged(_ => refetchComments(), true);
|
Sort.BindValueChanged(_ => refetchComments(), true);
|
||||||
|
Reference in New Issue
Block a user