mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Rename missing parameter
This commit is contained in:
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
|||||||
public class PaginatedKudosuHistoryContainer : PaginatedContainer<APIKudosuHistory>
|
public class PaginatedKudosuHistoryContainer : PaginatedContainer<APIKudosuHistory>
|
||||||
{
|
{
|
||||||
public PaginatedKudosuHistoryContainer(Bindable<User> user)
|
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;
|
ItemsPerPage = 5;
|
||||||
}
|
}
|
||||||
|
@ -33,18 +33,18 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
private APIRequest<List<TModel>> retrievalRequest;
|
private APIRequest<List<TModel>> retrievalRequest;
|
||||||
private CancellationTokenSource loadCancellation;
|
private CancellationTokenSource loadCancellation;
|
||||||
|
|
||||||
private readonly string missing;
|
private readonly string missingText;
|
||||||
private ShowMoreButton moreButton;
|
private ShowMoreButton moreButton;
|
||||||
private OsuSpriteText missingText;
|
private OsuSpriteText missing;
|
||||||
private PaginatedContainerHeader header;
|
private PaginatedContainerHeader header;
|
||||||
|
|
||||||
private readonly string headerText;
|
private readonly string headerText;
|
||||||
private readonly CounterVisibilityState counterVisibilityState;
|
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.headerText = headerText;
|
||||||
this.missing = missing;
|
this.missingText = missingText;
|
||||||
this.counterVisibilityState = counterVisibilityState;
|
this.counterVisibilityState = counterVisibilityState;
|
||||||
User.BindTo(user);
|
User.BindTo(user);
|
||||||
}
|
}
|
||||||
@ -76,10 +76,10 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
Margin = new MarginPadding { Top = 10 },
|
Margin = new MarginPadding { Top = 10 },
|
||||||
Action = showMore,
|
Action = showMore,
|
||||||
},
|
},
|
||||||
missingText = new OsuSpriteText
|
missing = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Font = OsuFont.GetFont(size: 15),
|
Font = OsuFont.GetFont(size: 15),
|
||||||
Text = missing,
|
Text = missingText,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -124,15 +124,15 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
moreButton.Hide();
|
moreButton.Hide();
|
||||||
moreButton.IsLoading = false;
|
moreButton.IsLoading = false;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(missingText.Text))
|
if (!string.IsNullOrEmpty(missing.Text))
|
||||||
missingText.Show();
|
missing.Show();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadComponentsAsync(items.Select(CreateDrawableItem).Where(d => d != null), drawables =>
|
LoadComponentsAsync(items.Select(CreateDrawableItem).Where(d => d != null), drawables =>
|
||||||
{
|
{
|
||||||
missingText.Hide();
|
missing.Hide();
|
||||||
moreButton.FadeTo(items.Count == ItemsPerPage ? 1 : 0);
|
moreButton.FadeTo(items.Count == ItemsPerPage ? 1 : 0);
|
||||||
moreButton.IsLoading = false;
|
moreButton.IsLoading = false;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
|||||||
public class PaginatedRecentActivityContainer : PaginatedContainer<APIRecentActivity>
|
public class PaginatedRecentActivityContainer : PaginatedContainer<APIRecentActivity>
|
||||||
{
|
{
|
||||||
public PaginatedRecentActivityContainer(Bindable<User> user)
|
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;
|
ItemsPerPage = 10;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user