1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 06:12:58 +08:00

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; private readonly BeatmapSetType type;
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user) public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user)
: base(user, "None... yet.") : base(user)
{ {
this.type = type; this.type = type;

View File

@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Profile.Sections
Children = new Drawable[] Children = new Drawable[]
{ {
new PaginatedMostPlayedBeatmapContainer(User), 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 class PaginatedKudosuHistoryContainer : PaginatedContainer<APIKudosuHistory>
{ {
public PaginatedKudosuHistoryContainer(Bindable<User> user, string missing) public PaginatedKudosuHistoryContainer(Bindable<User> user)
: base(user, missing) : base(user, "This user hasn't received any kudosu!")
{ {
ItemsPerPage = 5; ItemsPerPage = 5;
} }

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Profile.Sections
Children = new Drawable[] Children = new Drawable[]
{ {
new KudosuInfo(User), 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 readonly FillFlowContainer ItemsContainer;
protected RulesetStore Rulesets; protected RulesetStore Rulesets;
protected PaginatedContainer(Bindable<User> user, string missing) protected PaginatedContainer(Bindable<User> user, string missing = "")
{ {
User.BindTo(user); User.BindTo(user);
@ -107,7 +107,10 @@ namespace osu.Game.Overlays.Profile.Sections
{ {
moreButton.Hide(); moreButton.Hide();
moreButton.IsLoading = false; moreButton.IsLoading = false;
missingText.Show();
if (!string.IsNullOrEmpty(missingText.Text))
missingText.Show();
return; return;
} }

View File

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

View File

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

View File

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

View File

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