Rename User to APIUser and move to correct namespace

This commit is contained in:
Dean Herbert
2021-11-04 18:02:44 +09:00
parent 69aa620ab7
commit 0ecf5f201c
195 changed files with 990 additions and 946 deletions

View File

@ -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);
}
}