diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index 7e4257c23b..2bba1723ec 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -6,7 +6,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; -using osu.Framework.Platform; using osu.Game; using osu.Game.Configuration; using osu.Game.Graphics; @@ -24,15 +23,13 @@ namespace osu.Desktop.Overlays private OsuConfigManager config; private OsuGameBase game; private NotificationOverlay notificationOverlay; - private GameHost host; [BackgroundDependencyLoader] - private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config, GameHost host) + private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config) { notificationOverlay = notification; this.config = config; this.game = game; - this.host = host; AutoSizeAxes = Axes.Both; Anchor = Anchor.BottomCentre; diff --git a/osu.Game/Overlays/ChangelogOverlay.cs b/osu.Game/Overlays/ChangelogOverlay.cs index a957227c6b..552e213a45 100644 --- a/osu.Game/Overlays/ChangelogOverlay.cs +++ b/osu.Game/Overlays/ChangelogOverlay.cs @@ -168,12 +168,10 @@ namespace osu.Game.Overlays if (initialFetchTask != null) return initialFetchTask; - var tcs = new TaskCompletionSource(); - - initialFetchTask = tcs.Task; - - Task.Run(() => + return initialFetchTask = Task.Run(async () => { + var tcs = new TaskCompletionSource(); + var req = new GetChangelogRequest(); req.Success += res => { @@ -190,9 +188,9 @@ namespace osu.Game.Overlays }; req.Failure += _ => initialFetchTask = null; req.Perform(API); - }); - return initialFetchTask; + await tcs.Task; + }); } private CancellationTokenSource loadContentTask;