1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Improve scroll handling

This commit is contained in:
HoutarouOreki 2018-07-24 21:19:29 +02:00
parent 8e412fe403
commit 08a291f0d4

View File

@ -168,7 +168,6 @@ namespace osu.Game.Overlays
/// </summary>
public void FetchAndShowBuild(APIChangelog build, bool sentByBadges = false)
{
isAtListing = false;
var req = new GetChangelogBuildRequest(build.UpdateStream.Name, build.Version);
if (build.UpdateStream.DisplayName != null && build.DisplayVersion != null)
@ -182,10 +181,12 @@ namespace osu.Game.Overlays
chart.ShowUpdateStream(build.UpdateStream.Name);
req.Success += APIChangelog =>
{
savedScrollPosition = scroll.Current;
content.ShowBuild(APIChangelog);
if (scroll.Current > scroll.GetChildPosInContent(content))
scroll.ScrollTo(content);
if (isAtListing)
savedScrollPosition = scroll.Current;
isAtListing = false;
};
api.Queue(req);
}