mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Enable NRT in user profile overlay
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
@ -25,15 +23,15 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
{
|
||||
public partial class BottomHeaderContainer : CompositeDrawable
|
||||
{
|
||||
public readonly Bindable<APIUser> User = new Bindable<APIUser>();
|
||||
public readonly Bindable<APIUser?> User = new Bindable<APIUser?>();
|
||||
|
||||
private LinkFlowContainer topLinkContainer;
|
||||
private LinkFlowContainer bottomLinkContainer;
|
||||
private LinkFlowContainer topLinkContainer = null!;
|
||||
private LinkFlowContainer bottomLinkContainer = null!;
|
||||
|
||||
private Color4 iconColour;
|
||||
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
private IAPIProvider api { get; set; } = null!;
|
||||
|
||||
public BottomHeaderContainer()
|
||||
{
|
||||
@ -78,7 +76,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
User.BindValueChanged(user => updateDisplay(user.NewValue));
|
||||
}
|
||||
|
||||
private void updateDisplay(APIUser user)
|
||||
private void updateDisplay(APIUser? user)
|
||||
{
|
||||
topLinkContainer.Clear();
|
||||
bottomLinkContainer.Clear();
|
||||
@ -164,7 +162,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
|
||||
private void addSpacer(OsuTextFlowContainer textFlow) => textFlow.AddArbitraryDrawable(new Container { Width = 15 });
|
||||
|
||||
private bool tryAddInfo(IconUsage icon, string content, string link = null)
|
||||
private bool tryAddInfo(IconUsage icon, string content, string? link = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(content)) return false;
|
||||
|
||||
|
Reference in New Issue
Block a user