Skip to content

Commit

Permalink
fixes update button and bump (#234)
Browse files Browse the repository at this point in the history
* fixes download button and bump

* Update UnitystationLauncher/ViewModels/HubUpdateViewModel.cs

Co-authored-by: Gilles <[email protected]>

* Update UnitystationLauncher/ViewModels/HubUpdateViewModel.cs

Co-authored-by: Gilles <[email protected]>

---------

Co-authored-by: Gilles <[email protected]>
  • Loading branch information
Bod9001 and corp-0 authored Dec 13, 2024
1 parent ab669ca commit bde7857
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@
</screenshots>

<releases>
<release version="935" date="2024-12-14">
<release version="936" date="2024-12-13">
<description>
<p>Fix:</p>
<ul>
<li>Fixed the update button being greyed out</li>
</ul>
</description>
</release>
<release version="935" date="2024-12-13">
<description>
<p>Fix:</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion UnitystationLauncher/Constants/AppInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
9 changes: 7 additions & 2 deletions UnitystationLauncher/ViewModels/HubUpdateViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public string? UpdateMessage
set => this.RaiseAndSetIfChanged(ref _updateMessage, value);
}

public ReactiveCommand<Unit, Unit> Update { get; }
public ReactiveCommand<Unit, LauncherViewModel> Skip { get; }
public ReactiveCommand<Unit, LauncherViewModel> Ignore { get; }

Expand All @@ -35,11 +36,15 @@ public string? UpdateMessage
private readonly IHubService _hubService;
private readonly IPreferencesService _preferencesService;

public HubUpdateViewModel(Lazy<LauncherViewModel> launcherVm, IHubService hubService, IPreferencesService preferencesService)
public HubUpdateViewModel(Lazy<LauncherViewModel> 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);

Expand All @@ -58,7 +63,7 @@ private async Task<int> GetUpdateVersion()
return hubClientConfig?.BuildNumber ?? 0;
}

private void Update()
private void PerformUpdate()
{
ProcessStartInfo psi = new()
{
Expand Down

0 comments on commit bde7857

Please sign in to comment.