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 namespace osu.Game.Online.API.Requests
{ {
public class GetSpotlightsRequest : APIRequest<SpotlightsArray> public class GetSpotlightsRequest : APIRequest<SpotlightsCollection>
{ {
protected override string Target => "spotlights"; protected override string Target => "spotlights";
} }
public class SpotlightsArray public class SpotlightsCollection
{ {
[JsonProperty("spotlights")] [JsonProperty("spotlights")]
public List<APISpotlight> Spotlights; public List<APISpotlight> Spotlights;

View File

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

View File

@ -28,8 +28,8 @@ namespace osu.Game.Overlays.Rankings
public readonly Bindable<APISpotlight> SelectedSpotlight = new Bindable<APISpotlight>(); public readonly Bindable<APISpotlight> SelectedSpotlight = new Bindable<APISpotlight>();
private readonly InfoCoulmn startDateColumn; private readonly InfoColumn startDateColumn;
private readonly InfoCoulmn endDateColumn; private readonly InfoColumn endDateColumn;
public SpotlightSelector() public SpotlightSelector()
{ {
@ -64,8 +64,8 @@ namespace osu.Game.Overlays.Rankings
Spacing = new Vector2(15, 0), Spacing = new Vector2(15, 0),
Children = new Drawable[] Children = new Drawable[]
{ {
startDateColumn = new InfoCoulmn(@"Start Date"), startDateColumn = new InfoColumn(@"Start Date"),
endDateColumn = new InfoCoulmn(@"End Date"), endDateColumn = new InfoColumn(@"End Date"),
} }
} }
} }
@ -105,9 +105,9 @@ namespace osu.Game.Overlays.Rankings
endDateColumn.Value = dateToString(spotlight.NewValue.EndDate); 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 public string Value
{ {
@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Rankings
private readonly OsuSpriteText valueText; private readonly OsuSpriteText valueText;
public InfoCoulmn(string name) public InfoColumn(string name)
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Direction = FillDirection.Vertical; Direction = FillDirection.Vertical;