1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 18:27:26 +08:00

Applied suggested changes

This commit is contained in:
EVAST9919 2019-05-28 19:39:31 +03:00
parent 857eb9b83a
commit 19fbab6892
5 changed files with 6 additions and 12 deletions

View File

@ -29,8 +29,6 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
protected override void ShowMore()
{
base.ShowMore();
request = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
request.Success += sets => Schedule(() =>
{

View File

@ -24,8 +24,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
protected override void ShowMore()
{
base.ShowMore();
request = new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
request.Success += beatmaps => Schedule(() =>
{

View File

@ -20,7 +20,7 @@ using osu.Game.Users;
namespace osu.Game.Overlays.Profile.Sections
{
public class PaginatedContainer : FillFlowContainer
public abstract class PaginatedContainer : FillFlowContainer
{
protected readonly FillFlowContainer ItemsContainer;
protected readonly ShowMoreButton MoreButton;
@ -92,7 +92,7 @@ namespace osu.Game.Overlays.Profile.Sections
ShowMore();
}
protected virtual void ShowMore() => MoreButton.IsLoading = true;
protected abstract void ShowMore();
protected class ShowMoreButton : CircularContainer
{
@ -109,8 +109,11 @@ namespace osu.Game.Overlays.Profile.Sections
public bool IsLoading
{
get => isLoading;
set
{
if (isLoading == value)
return;
isLoading = value;
if (value)
@ -124,7 +127,6 @@ namespace osu.Game.Overlays.Profile.Sections
content.FadeIn(duration, Easing.OutQuint);
}
}
get => isLoading;
}
public ShowMoreButton()
@ -141,7 +143,6 @@ namespace osu.Game.Overlays.Profile.Sections
},
content = new FillFlowContainer
{
Alpha = 0,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Both,
@ -190,6 +191,7 @@ namespace osu.Game.Overlays.Profile.Sections
protected override bool OnClick(ClickEvent e)
{
IsLoading = true;
Action.Invoke();
return base.OnClick(e);
}

View File

@ -31,8 +31,6 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
protected override void ShowMore()
{
base.ShowMore();
request = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
request.Success += scores => Schedule(() =>
{

View File

@ -22,8 +22,6 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
protected override void ShowMore()
{
base.ShowMore();
request = new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
request.Success += activities => Schedule(() =>
{