mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Substitute APIUser
for UserProfile
in overlay
This commit is contained in:
@ -5,14 +5,13 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header.Components
|
||||
{
|
||||
public partial class FollowersButton : ProfileHeaderStatisticsButton
|
||||
{
|
||||
public readonly Bindable<APIUser?> User = new Bindable<APIUser?>();
|
||||
public readonly Bindable<UserProfile?> UserProfile = new Bindable<UserProfile?>();
|
||||
|
||||
public override LocalisableString TooltipText => FriendsStrings.ButtonsDisabled;
|
||||
|
||||
@ -22,7 +21,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
private void load()
|
||||
{
|
||||
// todo: when friending/unfriending is implemented, the APIAccess.Friends list should be updated accordingly.
|
||||
User.BindValueChanged(user => SetValue(user.NewValue?.FollowerCount ?? 0), true);
|
||||
UserProfile.BindValueChanged(user => SetValue(user.NewValue?.User.FollowerCount ?? 0), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user