mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 10:33:07 +08:00
Allow nulls and hide if missing dependencies
This commit is contained in:
parent
92872496b8
commit
72b6bb25a5
@ -13,7 +13,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
protected override string Header => "Updates";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(Storage storage, OsuConfigManager config, OsuGameBase game, UpdateManager updateManager)
|
||||
{
|
||||
Add(new SettingsEnumDropdown<ReleaseStream>
|
||||
@ -22,12 +22,15 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
Bindable = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
|
||||
});
|
||||
|
||||
Add(new SettingsButton
|
||||
if (game != null && updateManager != null)
|
||||
{
|
||||
Text = "Check for updates",
|
||||
Action = updateManager.CheckForUpdate,
|
||||
Enabled = { Value = game.IsDeployedBuild }
|
||||
});
|
||||
Add(new SettingsButton
|
||||
{
|
||||
Text = "Check for updates",
|
||||
Action = updateManager.CheckForUpdate,
|
||||
Enabled = { Value = game.IsDeployedBuild }
|
||||
});
|
||||
}
|
||||
|
||||
if (RuntimeInfo.IsDesktop)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user