mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Rename FrontPageDisplay
to ArticleListing
This commit is contained in:
parent
9267d23dc2
commit
958d51141d
@ -14,7 +14,10 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.News.Displays
|
||||
{
|
||||
public class FrontPageDisplay : CompositeDrawable
|
||||
/// <summary>
|
||||
/// Lists articles in a vertical flow for a specified year.
|
||||
/// </summary>
|
||||
public class ArticleListing : CompositeDrawable
|
||||
{
|
||||
public Action<GetNewsResponse> ResponseReceived;
|
||||
|
||||
@ -27,9 +30,13 @@ namespace osu.Game.Overlays.News.Displays
|
||||
private GetNewsRequest request;
|
||||
private Cursor lastCursor;
|
||||
|
||||
private readonly int year;
|
||||
private readonly int? year;
|
||||
|
||||
public FrontPageDisplay(int year = 0)
|
||||
/// <summary>
|
||||
/// Instantiate a listing for the specified year.
|
||||
/// </summary>
|
||||
/// <param name="year">The year to load articles from. If null, will show the most recent articles.</param>
|
||||
public ArticleListing(int? year = null)
|
||||
{
|
||||
this.year = year;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
Header.SetFrontPage();
|
||||
|
||||
var page = new FrontPageDisplay(year);
|
||||
var page = new ArticleListing(year);
|
||||
page.ResponseReceived += r =>
|
||||
{
|
||||
sidebar.Metadata.Value = r.SidebarMetadata;
|
||||
|
Loading…
Reference in New Issue
Block a user