diff --git a/osu.Game/Overlays/Changelog/ChangelogListing.cs b/osu.Game/Overlays/Changelog/ChangelogListing.cs index 1856f93205..41d8228475 100644 --- a/osu.Game/Overlays/Changelog/ChangelogListing.cs +++ b/osu.Game/Overlays/Changelog/ChangelogListing.cs @@ -47,12 +47,12 @@ private void load() Add(new OsuSpriteText { - Text = build.CreatedAt.Date.ToString("dd MMM yyyy"), - Font = OsuFont.GetFont(weight: FontWeight.Regular, size: 24), - Colour = OsuColour.FromHex(@"FD5"), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Margin = new MarginPadding { Top = 15 }, + Text = build.CreatedAt.Date.ToString("dd MMM yyyy"), + Font = OsuFont.GetFont(weight: FontWeight.Regular, size: 24), + Colour = OsuColour.FromHex(@"FD5"), }); currentDate = build.CreatedAt.Date; diff --git a/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs b/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs index 4f1d95bc2c..514e75c31a 100644 --- a/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs +++ b/osu.Game/Overlays/Changelog/UpdateStreamBadge.cs @@ -87,6 +87,13 @@ public UpdateStreamBadge(APIUpdateStream stream) SelectedTab.BindValueChanged(_ => updateState(), true); } + [BackgroundDependencyLoader] + private void load(AudioManager audio) + { + sampleClick = audio.Sample.Get(@"UI/generic-select-soft"); + sampleHover = audio.Sample.Get(@"UI/generic-hover-soft"); + } + protected override void OnActivated() => updateState(); protected override void OnDeactivated() => updateState(); @@ -146,12 +153,5 @@ public void DisableDim() externalDimRequested = false; updateState(); } - - [BackgroundDependencyLoader] - private void load(AudioManager audio) - { - sampleClick = audio.Sample.Get(@"UI/generic-select-soft"); - sampleHover = audio.Sample.Get(@"UI/generic-hover-soft"); - } } } diff --git a/osu.Game/Overlays/ChangelogOverlay.cs b/osu.Game/Overlays/ChangelogOverlay.cs index 552e213a45..7d791b2a88 100644 --- a/osu.Game/Overlays/ChangelogOverlay.cs +++ b/osu.Game/Overlays/ChangelogOverlay.cs @@ -120,10 +120,7 @@ public void ShowBuild([NotNull] string updateStream, [NotNull] string version) ?? streams.Find(s => s.Name == updateStream)?.LatestBuild; if (build != null) - { - Current.Value = build; - State = Visibility.Visible; - } + ShowBuild(build); }); State = Visibility.Visible; @@ -193,13 +190,13 @@ private Task fetchListing() }); } - private CancellationTokenSource loadContentTask; + private CancellationTokenSource loadContentCancellation; private void loadContent(ChangelogContent newContent) { content.FadeTo(0.2f, 300, Easing.OutQuint); - loadContentTask?.Cancel(); + loadContentCancellation?.Cancel(); LoadComponentAsync(newContent, c => { @@ -207,7 +204,7 @@ private void loadContent(ChangelogContent newContent) c.BuildSelected = ShowBuild; content.Child = c; - }, (loadContentTask = new CancellationTokenSource()).Token); + }, (loadContentCancellation = new CancellationTokenSource()).Token); } } }