Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes update button and bump #234

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading