From a7792070bc01f4108515f665f5ff17dc750c25e4 Mon Sep 17 00:00:00 2001 From: Craftplacer Date: Fri, 8 May 2020 01:08:17 +0200 Subject: [PATCH] Final changes to DI fields and values --- .../Settings/Sections/General/UpdateSettings.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs b/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs index 5af6a060ee..58966e8a4c 100644 --- a/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs @@ -11,16 +11,13 @@ namespace osu.Game.Overlays.Settings.Sections.General { public class UpdateSettings : SettingsSubsection { - [Resolved(CanBeNull = true)] - private OsuGameBase game { get; set; } - [Resolved(CanBeNull = true)] private UpdateManager updateManager { get; set; } protected override string Header => "Updates"; - [BackgroundDependencyLoader(true)] - private void load(Storage storage, OsuConfigManager config) + [BackgroundDependencyLoader] + private void load(Storage storage, OsuConfigManager config, OsuGameBase game) { Add(new SettingsEnumDropdown { @@ -28,7 +25,8 @@ namespace osu.Game.Overlays.Settings.Sections.General Bindable = config.GetBindable(OsuSetting.ReleaseStream), }); - if (game != null && updateManager != null) + // We shouldn't display the button for the base UpdateManager (without updating logic) + if (updateManager != null && updateManager.GetType() != typeof(UpdateManager)) { Add(new SettingsButton {