diff --git a/osu.Game/Online/API/Requests/Responses/APIChangelogBuild.cs b/osu.Game/Online/API/Requests/Responses/APIChangelogBuild.cs index 03c3ed0957..3377800c2b 100644 --- a/osu.Game/Online/API/Requests/Responses/APIChangelogBuild.cs +++ b/osu.Game/Online/API/Requests/Responses/APIChangelogBuild.cs @@ -31,9 +31,9 @@ namespace osu.Game.Online.API.Requests.Responses public List ChangelogEntries { get; set; } [JsonProperty("versions")] - public VersionNativation Versions { get; set; } + public VersionNatigation Versions { get; set; } - public class VersionNativation + public class VersionNatigation { [JsonProperty("next")] public APIChangelogBuild Next { get; set; } diff --git a/osu.Game/Overlays/ChangelogOverlay.cs b/osu.Game/Overlays/ChangelogOverlay.cs index 2b3fda39a4..ef049035c3 100644 --- a/osu.Game/Overlays/ChangelogOverlay.cs +++ b/osu.Game/Overlays/ChangelogOverlay.cs @@ -157,28 +157,32 @@ namespace osu.Game.Overlays /// are specified, the header will instantly display them. public void ShowBuild(APIChangelogBuild build) { - var req = new GetChangelogBuildRequest(build.UpdateStream.Name, build.Version); - - if (build.UpdateStream.DisplayName != null && build.DisplayVersion != null) - header.ShowBuild(build.UpdateStream.DisplayName, build.DisplayVersion); - else - req.Success += res => header.ShowBuild(res.UpdateStream.DisplayName, res.DisplayVersion); - + header.ShowBuild(build.UpdateStream.DisplayName, build.DisplayVersion); badges.SelectUpdateStream(build.UpdateStream.Name); - req.Success += apiChangelog => + listing.Hide(); + + void displayBuild(APIChangelogBuild populatedBuild) { - listing.Hide(); content.Show(); - content.ShowBuild(apiChangelog); + content.ShowBuild(populatedBuild); + if (scroll.Current > scroll.GetChildPosInContent(content)) scroll.ScrollTo(content); + if (isAtListing) savedScrollPosition = scroll.Current; isAtListing = false; - }; + } - API.Queue(req); + if (build.Versions != null) + displayBuild(build); + else + { + var req = new GetChangelogBuildRequest(build.UpdateStream.Name, build.Version); + req.Success += displayBuild; + API.Queue(req); + } } } }