From bde78579a8066fd90e4c954529da824184d3eb27 Mon Sep 17 00:00:00 2001 From: Bod9001 Date: Fri, 13 Dec 2024 17:57:54 +0000 Subject: [PATCH] fixes update button and bump (#234) * fixes download button and bump * Update UnitystationLauncher/ViewModels/HubUpdateViewModel.cs Co-authored-by: Gilles <43683714+corp-0@users.noreply.github.com> * Update UnitystationLauncher/ViewModels/HubUpdateViewModel.cs Co-authored-by: Gilles <43683714+corp-0@users.noreply.github.com> --------- Co-authored-by: Gilles <43683714+corp-0@users.noreply.github.com> --- .../Assets/org.unitystation.StationHub.metainfo.xml | 10 +++++++++- UnitystationLauncher/Constants/AppInfo.cs | 2 +- UnitystationLauncher/ViewModels/HubUpdateViewModel.cs | 9 +++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml b/UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml index 92fb721a..79d1666f 100644 --- a/UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml +++ b/UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml @@ -65,7 +65,15 @@ - + + +

Fix:

+
    +
  • Fixed the update button being greyed out
  • +
+
+
+

Fix:

    diff --git a/UnitystationLauncher/Constants/AppInfo.cs b/UnitystationLauncher/Constants/AppInfo.cs index 40442524..3521b1fb 100644 --- a/UnitystationLauncher/Constants/AppInfo.cs +++ b/UnitystationLauncher/Constants/AppInfo.cs @@ -4,5 +4,5 @@ public static class AppInfo { // Whenever you change the currentBuild here, please also update the one in // UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml - public const int CurrentBuild = 935; + public const int CurrentBuild = 936; } \ No newline at end of file diff --git a/UnitystationLauncher/ViewModels/HubUpdateViewModel.cs b/UnitystationLauncher/ViewModels/HubUpdateViewModel.cs index ff0038d0..b7c088de 100644 --- a/UnitystationLauncher/ViewModels/HubUpdateViewModel.cs +++ b/UnitystationLauncher/ViewModels/HubUpdateViewModel.cs @@ -24,6 +24,7 @@ public string? UpdateMessage set => this.RaiseAndSetIfChanged(ref _updateMessage, value); } + public ReactiveCommand Update { get; } public ReactiveCommand Skip { get; } public ReactiveCommand Ignore { get; } @@ -35,11 +36,15 @@ public string? UpdateMessage private readonly IHubService _hubService; private readonly IPreferencesService _preferencesService; - public HubUpdateViewModel(Lazy launcherVm, IHubService hubService, IPreferencesService preferencesService) + public HubUpdateViewModel(Lazy launcherVm, IHubService hubService, + IPreferencesService preferencesService) { _launcherVm = launcherVm; _hubService = hubService; _preferencesService = preferencesService; + + // Initialize ReactiveCommands + Update = ReactiveCommand.Create(PerformUpdate); Ignore = ReactiveCommand.Create(IgnoreUpdate); Skip = ReactiveCommand.Create(SkipUpdate); @@ -58,7 +63,7 @@ private async Task GetUpdateVersion() return hubClientConfig?.BuildNumber ?? 0; } - private void Update() + private void PerformUpdate() { ProcessStartInfo psi = new() {