1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Allow downgrading

Also better address UpdateManager conflict
This commit is contained in:
smallketchup82 2024-07-04 18:00:45 -04:00
parent 6a03092944
commit 72cf6bb12c
No known key found for this signature in database
GPG Key ID: 7345B7C561243F1E

View File

@ -9,14 +9,15 @@ using osu.Game;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
using osu.Game.Screens.Play;
using osu.Game.Updater;
using Velopack;
using Velopack.Sources;
using UpdateManager = Velopack.UpdateManager;
namespace osu.Desktop.Updater
{
public partial class VeloUpdateManager : UpdateManager
public partial class VeloUpdateManager : Game.Updater.UpdateManager
{
private readonly Velopack.UpdateManager updateManager;
private readonly UpdateManager updateManager;
private INotificationOverlay notificationOverlay = null!;
[Resolved]
@ -28,7 +29,10 @@ namespace osu.Desktop.Updater
public VeloUpdateManager()
{
const string? github_token = null; // TODO: populate.
updateManager = new Velopack.UpdateManager(new GithubSource(@"https://github.com/ppy/osu", github_token, false));
updateManager = new UpdateManager(new GithubSource(@"https://github.com/ppy/osu", github_token, false), new UpdateOptions
{
AllowVersionDowngrade = true
});
}
[BackgroundDependencyLoader]