mirror of
https://github.com/ppy/osu
synced 2025-01-05 21:59:46 +00:00
Rename missing parameter
This commit is contained in:
parent
be5d143b5a
commit
22c5e9f64f
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
public class PaginatedKudosuHistoryContainer : PaginatedContainer<APIKudosuHistory>
|
||||
{
|
||||
public PaginatedKudosuHistoryContainer(Bindable<User> user)
|
||||
: base(user, missing: "This user hasn't received any kudosu!")
|
||||
: base(user, missingText: "This user hasn't received any kudosu!")
|
||||
{
|
||||
ItemsPerPage = 5;
|
||||
}
|
||||
|
@ -33,18 +33,18 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
private APIRequest<List<TModel>> retrievalRequest;
|
||||
private CancellationTokenSource loadCancellation;
|
||||
|
||||
private readonly string missing;
|
||||
private readonly string missingText;
|
||||
private ShowMoreButton moreButton;
|
||||
private OsuSpriteText missingText;
|
||||
private OsuSpriteText missing;
|
||||
private PaginatedContainerHeader header;
|
||||
|
||||
private readonly string headerText;
|
||||
private readonly CounterVisibilityState counterVisibilityState;
|
||||
|
||||
protected PaginatedContainer(Bindable<User> user, string headerText = "", string missing = "", CounterVisibilityState counterVisibilityState = CounterVisibilityState.AlwaysHidden)
|
||||
protected PaginatedContainer(Bindable<User> user, string headerText = "", string missingText = "", CounterVisibilityState counterVisibilityState = CounterVisibilityState.AlwaysHidden)
|
||||
{
|
||||
this.headerText = headerText;
|
||||
this.missing = missing;
|
||||
this.missingText = missingText;
|
||||
this.counterVisibilityState = counterVisibilityState;
|
||||
User.BindTo(user);
|
||||
}
|
||||
@ -76,10 +76,10 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
Margin = new MarginPadding { Top = 10 },
|
||||
Action = showMore,
|
||||
},
|
||||
missingText = new OsuSpriteText
|
||||
missing = new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 15),
|
||||
Text = missing,
|
||||
Text = missingText,
|
||||
Alpha = 0,
|
||||
},
|
||||
};
|
||||
@ -124,15 +124,15 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
moreButton.Hide();
|
||||
moreButton.IsLoading = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(missingText.Text))
|
||||
missingText.Show();
|
||||
if (!string.IsNullOrEmpty(missing.Text))
|
||||
missing.Show();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
LoadComponentsAsync(items.Select(CreateDrawableItem).Where(d => d != null), drawables =>
|
||||
{
|
||||
missingText.Hide();
|
||||
missing.Hide();
|
||||
moreButton.FadeTo(items.Count == ItemsPerPage ? 1 : 0);
|
||||
moreButton.IsLoading = false;
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
public class PaginatedRecentActivityContainer : PaginatedContainer<APIRecentActivity>
|
||||
{
|
||||
public PaginatedRecentActivityContainer(Bindable<User> user)
|
||||
: base(user, missing: "This user hasn't done anything notable recently!")
|
||||
: base(user, missingText: "This user hasn't done anything notable recently!")
|
||||
{
|
||||
ItemsPerPage = 10;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user