Remove missing text where not needed

This commit is contained in:
Andrei Zavatski 2020-09-07 22:30:43 +03:00
parent 1c55039994
commit b7bd084296
9 changed files with 17 additions and 14 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
private readonly BeatmapSetType type;
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user)
: base(user, "None... yet.")
: base(user)
{
this.type = type;

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Profile.Sections
Children = new Drawable[]
{
new PaginatedMostPlayedBeatmapContainer(User),
new PaginatedScoreContainer(ScoreType.Recent, User, "No performance records. :("),
new PaginatedScoreContainer(ScoreType.Recent, User),
};
}
}

View File

@ -13,8 +13,8 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
{
public class PaginatedKudosuHistoryContainer : PaginatedContainer<APIKudosuHistory>
{
public PaginatedKudosuHistoryContainer(Bindable<User> user, string missing)
: base(user, missing)
public PaginatedKudosuHistoryContainer(Bindable<User> user)
: base(user, "This user hasn't received any kudosu!")
{
ItemsPerPage = 5;
}

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Profile.Sections
Children = new Drawable[]
{
new KudosuInfo(User),
new PaginatedKudosuHistoryContainer(User, "This user hasn't received any kudosu!"),
new PaginatedKudosuHistoryContainer(User),
};
}
}

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays.Profile.Sections
protected readonly FillFlowContainer ItemsContainer;
protected RulesetStore Rulesets;
protected PaginatedContainer(Bindable<User> user, string missing)
protected PaginatedContainer(Bindable<User> user, string missing = "")
{
User.BindTo(user);
@ -107,7 +107,10 @@ namespace osu.Game.Overlays.Profile.Sections
{
moreButton.Hide();
moreButton.IsLoading = false;
missingText.Show();
if (!string.IsNullOrEmpty(missingText.Text))
missingText.Show();
return;
}

View File

@ -17,8 +17,8 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
{
private readonly ScoreType type;
public PaginatedScoreContainer(ScoreType type, Bindable<User> user, string missing)
: base(user, missing)
public PaginatedScoreContainer(ScoreType type, Bindable<User> user)
: base(user)
{
this.type = type;

View File

@ -16,8 +16,8 @@ namespace osu.Game.Overlays.Profile.Sections
{
Children = new[]
{
new PaginatedScoreContainer(ScoreType.Best, User, "No performance records. :("),
new PaginatedScoreContainer(ScoreType.Firsts, User, "No awesome performance records yet. :("),
new PaginatedScoreContainer(ScoreType.Best, User),
new PaginatedScoreContainer(ScoreType.Firsts, User),
};
}
}

View File

@ -14,8 +14,8 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
{
public class PaginatedRecentActivityContainer : PaginatedContainer<APIRecentActivity>
{
public PaginatedRecentActivityContainer(Bindable<User> user, string missing)
: base(user, missing)
public PaginatedRecentActivityContainer(Bindable<User> user)
: base(user)
{
ItemsPerPage = 10;
ItemsContainer.Spacing = new Vector2(0, 8);

View File

@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Profile.Sections
{
Children = new[]
{
new PaginatedRecentActivityContainer(User, "This user hasn't done anything notable recently!"),
new PaginatedRecentActivityContainer(User),
};
}
}