mirror of
https://github.com/ppy/osu
synced 2025-01-22 05:43:14 +00:00
Don't show update button when updates are not feasible
This commit is contained in:
parent
d2155c3da3
commit
53b7057ee0
@ -30,16 +30,18 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
Bindable = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
|
Bindable = config.GetBindable<ReleaseStream>(OsuSetting.ReleaseStream),
|
||||||
});
|
});
|
||||||
|
|
||||||
// We should only display the button for UpdateManagers that do check for updates
|
if (updateManager.CanCheckForUpdate)
|
||||||
Add(checkForUpdatesButton = new SettingsButton
|
|
||||||
{
|
{
|
||||||
Text = "Check for updates",
|
Add(checkForUpdatesButton = new SettingsButton
|
||||||
Action = () =>
|
|
||||||
{
|
{
|
||||||
checkForUpdatesButton.Enabled.Value = false;
|
Text = "Check for updates",
|
||||||
Task.Run(updateManager.CheckForUpdateAsync).ContinueWith(t => Schedule(() => checkForUpdatesButton.Enabled.Value = true));
|
Action = () =>
|
||||||
}
|
{
|
||||||
});
|
checkForUpdatesButton.Enabled.Value = false;
|
||||||
|
Task.Run(updateManager.CheckForUpdateAsync).ContinueWith(t => Schedule(() => checkForUpdatesButton.Enabled.Value = true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (RuntimeInfo.IsDesktop)
|
if (RuntimeInfo.IsDesktop)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user