Skip to content

Commit

Permalink
HotFix
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicPredator committed Mar 23, 2024
1 parent 4c3e259 commit a8b0ec5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/AniMoe.App/AniMoe.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Semver" Version="2.3.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
Expand Down
10 changes: 7 additions & 3 deletions src/AniMoe.App/ViewModels/UpdateViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Semver;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Expand Down Expand Up @@ -40,9 +42,11 @@ public partial class UpdateViewModel : ObservableObject
private async Task runRequest()

Check warning on line 42 in src/AniMoe.App/ViewModels/UpdateViewModel.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 42 in src/AniMoe.App/ViewModels/UpdateViewModel.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 42 in src/AniMoe.App/ViewModels/UpdateViewModel.cs

View workflow job for this annotation

GitHub Actions / build-x64

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 42 in src/AniMoe.App/ViewModels/UpdateViewModel.cs

View workflow job for this annotation

GitHub Actions / build-x64

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
LoaderState = true;
Model = await handler.CheckLatestRelease();
//Model = await handler.CheckLatestRelease();
LoaderState = false;
if (Model.TagName.CompareTo(CurrentAppVersion) > 0)
var appVersion = SemVersion.Parse(CurrentAppVersion, SemVersionStyles.Any);
var newVersion = SemVersion.Parse(Model.TagName, SemVersionStyles.Any);
if (SemVersion.ComparePrecedence(newVersion, appVersion) > 0)
{
_dispatcherQueue.TryEnqueue(async () =>
{
Expand All @@ -60,7 +64,7 @@ private async Task runRequest()

public UpdateViewModel(XamlRoot xamlRoot, DispatcherQueue dispatcherQueue)
{
CurrentAppVersion = string.Format("Version: {0}.{1}.{2}",
CurrentAppVersion = string.Format("{0}.{1}.{2}",
Package.Current.Id.Version.Major,
Package.Current.Id.Version.Minor,
Package.Current.Id.Version.Build);
Expand Down

0 comments on commit a8b0ec5

Please sign in to comment.