mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 18:32:56 +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"
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
||||||
}, api.IsLoggedIn));
|
}, 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("Hide", profile.Hide);
|
||||||
AddStep("Show without reload", profile.Show);
|
AddStep("Show without reload", profile.Show);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,8 @@ namespace osu.Game.Overlays
|
|||||||
Clear();
|
Clear();
|
||||||
lastSection = null;
|
lastSection = null;
|
||||||
|
|
||||||
sections = new ProfileSection[]
|
sections = !user.IsBot
|
||||||
|
? new ProfileSection[]
|
||||||
{
|
{
|
||||||
//new AboutSection(),
|
//new AboutSection(),
|
||||||
new RecentSection(),
|
new RecentSection(),
|
||||||
@ -53,6 +54,10 @@ namespace osu.Game.Overlays
|
|||||||
new HistoricalSection(),
|
new HistoricalSection(),
|
||||||
new BeatmapsSection(),
|
new BeatmapsSection(),
|
||||||
new KudosuSection()
|
new KudosuSection()
|
||||||
|
}
|
||||||
|
: new ProfileSection[]
|
||||||
|
{
|
||||||
|
//new AboutSection(),
|
||||||
};
|
};
|
||||||
|
|
||||||
tabs = new ProfileTabControl
|
tabs = new ProfileTabControl
|
||||||
|
@ -78,6 +78,9 @@ namespace osu.Game.Users
|
|||||||
[JsonProperty(@"is_bng")]
|
[JsonProperty(@"is_bng")]
|
||||||
public bool IsBNG;
|
public bool IsBNG;
|
||||||
|
|
||||||
|
[JsonProperty(@"is_bot")]
|
||||||
|
public bool IsBot;
|
||||||
|
|
||||||
[JsonProperty(@"is_active")]
|
[JsonProperty(@"is_active")]
|
||||||
public bool Active;
|
public bool Active;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user