mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Rename User
to APIUser
and move to correct namespace
This commit is contained in:
@ -7,8 +7,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Users;
|
||||
using static osu.Game.Users.User;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
{
|
||||
@ -21,7 +20,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
/// </summary>
|
||||
protected abstract LocalisableString GraphCounterName { get; }
|
||||
|
||||
protected ChartProfileSubsection(Bindable<User> user, LocalisableString headerText)
|
||||
protected ChartProfileSubsection(Bindable<APIUser> user, LocalisableString headerText)
|
||||
: base(user, headerText)
|
||||
{
|
||||
}
|
||||
@ -45,7 +44,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
User.BindValueChanged(onUserChanged, true);
|
||||
}
|
||||
|
||||
private void onUserChanged(ValueChangedEvent<User> e)
|
||||
private void onUserChanged(ValueChangedEvent<APIUser> e)
|
||||
{
|
||||
var values = GetValues(e.NewValue);
|
||||
|
||||
@ -62,9 +61,9 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
/// <summary>
|
||||
/// Add entries for any missing months (filled with zero values).
|
||||
/// </summary>
|
||||
private UserHistoryCount[] fillZeroValues(UserHistoryCount[] historyEntries)
|
||||
private APIUserHistoryCount[] fillZeroValues(APIUserHistoryCount[] historyEntries)
|
||||
{
|
||||
var filledHistoryEntries = new List<UserHistoryCount>();
|
||||
var filledHistoryEntries = new List<APIUserHistoryCount>();
|
||||
|
||||
foreach (var entry in historyEntries)
|
||||
{
|
||||
@ -72,7 +71,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
|
||||
while (lastFilled?.Date.AddMonths(1) < entry.Date)
|
||||
{
|
||||
filledHistoryEntries.Add(lastFilled = new UserHistoryCount
|
||||
filledHistoryEntries.Add(lastFilled = new APIUserHistoryCount
|
||||
{
|
||||
Count = 0,
|
||||
Date = lastFilled.Date.AddMonths(1)
|
||||
@ -85,6 +84,6 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
return filledHistoryEntries.ToArray();
|
||||
}
|
||||
|
||||
protected abstract UserHistoryCount[] GetValues(User user);
|
||||
protected abstract APIUserHistoryCount[] GetValues(APIUser user);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user