mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Remove redundant subsection title.
- Also handle opening UserProfile in LinkFlowContainer similar to how beatmaps and channels are handled
This commit is contained in:
parent
62913163e0
commit
2e535afb84
@ -23,16 +23,14 @@ namespace osu.Game.Graphics.Containers
|
|||||||
public override bool HandleMouseInput => true;
|
public override bool HandleMouseInput => true;
|
||||||
|
|
||||||
private OsuGame game;
|
private OsuGame game;
|
||||||
private UserProfileOverlay userProfile;
|
|
||||||
|
|
||||||
private Action showNotImplementedError;
|
private Action showNotImplementedError;
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuGame game, NotificationOverlay notifications, UserProfileOverlay userProfile)
|
private void load(OsuGame game, NotificationOverlay notifications)
|
||||||
{
|
{
|
||||||
// will be null in tests
|
// will be null in tests
|
||||||
this.game = game;
|
this.game = game;
|
||||||
this.userProfile = userProfile;
|
|
||||||
|
|
||||||
showNotImplementedError = () => notifications?.Post(new SimpleNotification
|
showNotImplementedError = () => notifications?.Post(new SimpleNotification
|
||||||
{
|
{
|
||||||
@ -94,7 +92,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
break;
|
break;
|
||||||
case LinkAction.OpenUserProfile:
|
case LinkAction.OpenUserProfile:
|
||||||
if (long.TryParse(linkArgument, out long userId))
|
if (long.TryParse(linkArgument, out long userId))
|
||||||
userProfile?.ShowUser(userId);
|
game?.ShowUser(userId);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
||||||
|
@ -154,6 +154,12 @@ namespace osu.Game
|
|||||||
/// <param name="setId">The set to display.</param>
|
/// <param name="setId">The set to display.</param>
|
||||||
public void ShowBeatmapSet(int setId) => beatmapSetOverlay.ShowBeatmapSet(setId);
|
public void ShowBeatmapSet(int setId) => beatmapSetOverlay.ShowBeatmapSet(setId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Show a user's profile as an overlay.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId">The user to display.</param>
|
||||||
|
public void ShowUser(long userId) => userProfile.ShowUser(userId);
|
||||||
|
|
||||||
protected void LoadScore(Score s)
|
protected void LoadScore(Score s)
|
||||||
{
|
{
|
||||||
scoreLoad?.Cancel();
|
scoreLoad?.Cancel();
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
{
|
{
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new PaginatedRecentActivityContainer(User, @"Recent", @"This user hasn't done anything notable recently!"),
|
new PaginatedRecentActivityContainer(User, null, @"This user hasn't done anything notable recently!"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user