1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Share web request between builds and streams

This commit is contained in:
Dean Herbert 2019-05-13 16:44:43 +09:00
parent 37a8d9eb80
commit e9c3f54307
2 changed files with 6 additions and 14 deletions

View File

@ -1,9 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.API.Requests
{
public class GetChangelogLatestBuildsRequest : GetChangelogRequest
{
}
}

View File

@ -108,11 +108,8 @@ namespace osu.Game.Overlays
protected override void LoadComplete()
{
var req = new GetChangelogLatestBuildsRequest();
req.Success += res => badges.Populate(res.Streams);
api.Queue(req);
fetchListing();
base.LoadComplete();
fetchListing();
}
protected override void PopIn()
@ -166,7 +163,11 @@ namespace osu.Game.Overlays
isAtListing = true;
var req = new GetChangelogRequest();
badges.SelectNone();
req.Success += res => listing.ShowListing(res.Builds);
req.Success += res =>
{
listing.ShowListing(res.Builds);
badges.Populate(res.Streams);
};
api.Queue(req);
}