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:
parent
37a8d9eb80
commit
e9c3f54307
@ -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
|
||||
{
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user