Skip to content

Commit

Permalink
2.5.3.18
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari committed Jun 2, 2022
1 parent 9e4c272 commit 48483d1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
### Changelog

#### Version - 3.0.0.4 - 5/23/2022
* Alpha (testing) release
* Complete rewrite of the app for .NET 6
* Most code has been rewritten to be cross platform
#### Version - 2.5.3.18 - 6/1/2022
* Switch to a working version of Game Finder

#### Version - 2.5.3.17 - 6/1/2022
* Switch the launcher to 3.0 code
* Download new releases from the Nexus when possible

#### Version - 2.5.3.16 - 5/22/2022
* Update to the latest Game Finder library
Expand Down
Binary file added Wabbajack.Launcher/Resources/Icons/wabbajack.ico
Binary file not shown.
17 changes: 12 additions & 5 deletions Wabbajack.Launcher/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
using Wabbajack.Downloaders.Http;
using Wabbajack.DTOs;
using Wabbajack.DTOs.DownloadStates;
using Wabbajack.DTOs.Logins;
using Wabbajack.Networking.Http.Interfaces;
using Wabbajack.Networking.NexusApi;
using Wabbajack.Paths;
using Wabbajack.Paths.IO;
Expand All @@ -29,12 +31,14 @@ public class MainWindowViewModel : ViewModelBase
public Uri GITHUB_REPO = new("https://api.github.com/repos/wabbajack-tools/wabbajack/releases");
private readonly NexusApi _nexusApi;
private readonly HttpDownloader _downloader;
private readonly ITokenProvider<NexusApiState> _tokenProvider;

public MainWindowViewModel(NexusApi nexusApi, HttpDownloader downloader)
public MainWindowViewModel(NexusApi nexusApi, HttpDownloader downloader, ITokenProvider<NexusApiState> tokenProvider)
{
_nexusApi = nexusApi;
Status = "Checking for new versions";
_downloader = downloader;
_tokenProvider = tokenProvider;
var tsk = CheckForUpdates();
}

Expand All @@ -47,10 +51,13 @@ private async Task CheckForUpdates()

try
{
var nexusRelease = await GetNexusReleases(CancellationToken.None);
if (nexusRelease != default)
_version = nexusRelease;
else

if (_tokenProvider.HaveToken())
{
_version = await GetNexusReleases(CancellationToken.None);
}

if (_version == default)
{
_version = await GetGithubRelease(CancellationToken.None);
}
Expand Down
3 changes: 3 additions & 0 deletions Wabbajack.Launcher/Wabbajack.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Icons\wabbajack.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.2.0">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 48483d1

Please sign in to comment.