1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Apply suggestions

This commit is contained in:
Andrei Zavatski 2020-01-10 20:46:35 +03:00
parent 2e627f4b7c
commit 9260ea9195
3 changed files with 10 additions and 10 deletions

View File

@ -7,12 +7,12 @@ using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetSpotlightsRequest : APIRequest<SpotlightsArray>
public class GetSpotlightsRequest : APIRequest<SpotlightsCollection>
{
protected override string Target => "spotlights";
}
public class SpotlightsArray
public class SpotlightsCollection
{
[JsonProperty("spotlights")]
public List<APISpotlight> Spotlights;

View File

@ -27,7 +27,7 @@ namespace osu.Game.Online.API.Requests.Responses
public DateTimeOffset EndDate;
[JsonProperty(@"participant_count")]
public int? ParticipiantCount;
public int? ParticipantCount;
public override string ToString() => Name;
}

View File

@ -28,8 +28,8 @@ namespace osu.Game.Overlays.Rankings
public readonly Bindable<APISpotlight> SelectedSpotlight = new Bindable<APISpotlight>();
private readonly InfoCoulmn startDateColumn;
private readonly InfoCoulmn endDateColumn;
private readonly InfoColumn startDateColumn;
private readonly InfoColumn endDateColumn;
public SpotlightSelector()
{
@ -64,8 +64,8 @@ namespace osu.Game.Overlays.Rankings
Spacing = new Vector2(15, 0),
Children = new Drawable[]
{
startDateColumn = new InfoCoulmn(@"Start Date"),
endDateColumn = new InfoCoulmn(@"End Date"),
startDateColumn = new InfoColumn(@"Start Date"),
endDateColumn = new InfoColumn(@"End Date"),
}
}
}
@ -105,9 +105,9 @@ namespace osu.Game.Overlays.Rankings
endDateColumn.Value = dateToString(spotlight.NewValue.EndDate);
}
private string dateToString(DateTimeOffset date) => $"{date.Year}-{date.Month:D2}-{date.Day:D2}";
private string dateToString(DateTimeOffset date) => date.ToString("yyyy-MM-dd");
private class InfoCoulmn : FillFlowContainer
private class InfoColumn : FillFlowContainer
{
public string Value
{
@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Rankings
private readonly OsuSpriteText valueText;
public InfoCoulmn(string name)
public InfoColumn(string name)
{
AutoSizeAxes = Axes.Both;
Direction = FillDirection.Vertical;