mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 18:13:09 +08:00
Applied suggested changes
This commit is contained in:
parent
857eb9b83a
commit
19fbab6892
@ -29,8 +29,6 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
|||||||
|
|
||||||
protected override void ShowMore()
|
protected override void ShowMore()
|
||||||
{
|
{
|
||||||
base.ShowMore();
|
|
||||||
|
|
||||||
request = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
|
request = new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
|
||||||
request.Success += sets => Schedule(() =>
|
request.Success += sets => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
|||||||
|
|
||||||
protected override void ShowMore()
|
protected override void ShowMore()
|
||||||
{
|
{
|
||||||
base.ShowMore();
|
|
||||||
|
|
||||||
request = new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
|
request = new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
|
||||||
request.Success += beatmaps => Schedule(() =>
|
request.Success += beatmaps => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ using osu.Game.Users;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections
|
namespace osu.Game.Overlays.Profile.Sections
|
||||||
{
|
{
|
||||||
public class PaginatedContainer : FillFlowContainer
|
public abstract class PaginatedContainer : FillFlowContainer
|
||||||
{
|
{
|
||||||
protected readonly FillFlowContainer ItemsContainer;
|
protected readonly FillFlowContainer ItemsContainer;
|
||||||
protected readonly ShowMoreButton MoreButton;
|
protected readonly ShowMoreButton MoreButton;
|
||||||
@ -92,7 +92,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
ShowMore();
|
ShowMore();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void ShowMore() => MoreButton.IsLoading = true;
|
protected abstract void ShowMore();
|
||||||
|
|
||||||
protected class ShowMoreButton : CircularContainer
|
protected class ShowMoreButton : CircularContainer
|
||||||
{
|
{
|
||||||
@ -109,8 +109,11 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
|
|
||||||
public bool IsLoading
|
public bool IsLoading
|
||||||
{
|
{
|
||||||
|
get => isLoading;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (isLoading == value)
|
||||||
|
return;
|
||||||
isLoading = value;
|
isLoading = value;
|
||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
@ -124,7 +127,6 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
content.FadeIn(duration, Easing.OutQuint);
|
content.FadeIn(duration, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get => isLoading;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShowMoreButton()
|
public ShowMoreButton()
|
||||||
@ -141,7 +143,6 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
},
|
},
|
||||||
content = new FillFlowContainer
|
content = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -190,6 +191,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
|
IsLoading = true;
|
||||||
Action.Invoke();
|
Action.Invoke();
|
||||||
return base.OnClick(e);
|
return base.OnClick(e);
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,6 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
|||||||
|
|
||||||
protected override void ShowMore()
|
protected override void ShowMore()
|
||||||
{
|
{
|
||||||
base.ShowMore();
|
|
||||||
|
|
||||||
request = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
|
request = new GetUserScoresRequest(User.Value.Id, type, VisiblePages++ * ItemsPerPage);
|
||||||
request.Success += scores => Schedule(() =>
|
request.Success += scores => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
@ -22,8 +22,6 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
|||||||
|
|
||||||
protected override void ShowMore()
|
protected override void ShowMore()
|
||||||
{
|
{
|
||||||
base.ShowMore();
|
|
||||||
|
|
||||||
request = new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
|
request = new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++ * ItemsPerPage);
|
||||||
request.Success += activities => Schedule(() =>
|
request.Success += activities => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user