mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Hide unnecessary profile sections for bots (#6289)
Hide unnecessary profile sections for bots Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
commit
2f877be0c4
@ -107,6 +107,15 @@ namespace osu.Game.Tests.Visual.Online
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
||||
}, api.IsLoggedIn));
|
||||
|
||||
AddStep("Show bancho", () => profile.ShowUser(new User
|
||||
{
|
||||
Username = @"BanchoBot",
|
||||
Id = 3,
|
||||
IsBot = true,
|
||||
Country = new Country { FullName = @"Saint Helena", FlagName = @"SH" },
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c4.jpg"
|
||||
}, api.IsLoggedIn));
|
||||
|
||||
AddStep("Hide", profile.Hide);
|
||||
AddStep("Show without reload", profile.Show);
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ namespace osu.Game.Overlays
|
||||
Clear();
|
||||
lastSection = null;
|
||||
|
||||
sections = new ProfileSection[]
|
||||
sections = !user.IsBot
|
||||
? new ProfileSection[]
|
||||
{
|
||||
//new AboutSection(),
|
||||
new RecentSection(),
|
||||
@ -53,6 +54,10 @@ namespace osu.Game.Overlays
|
||||
new HistoricalSection(),
|
||||
new BeatmapsSection(),
|
||||
new KudosuSection()
|
||||
}
|
||||
: new ProfileSection[]
|
||||
{
|
||||
//new AboutSection(),
|
||||
};
|
||||
|
||||
tabs = new ProfileTabControl
|
||||
|
@ -78,6 +78,9 @@ namespace osu.Game.Users
|
||||
[JsonProperty(@"is_bng")]
|
||||
public bool IsBNG;
|
||||
|
||||
[JsonProperty(@"is_bot")]
|
||||
public bool IsBot;
|
||||
|
||||
[JsonProperty(@"is_active")]
|
||||
public bool Active;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user