Skip to content

Commit

Permalink
FIXED LOGIN ISSUES FINALLY
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxlider committed Oct 12, 2024
1 parent cb4f1ce commit 9d2dc65
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
6 changes: 6 additions & 0 deletions FASTER.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FASTERTests", "FASTERTests\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FASTER Maintenance", "FASTER Maintenance\FASTER Maintenance.csproj", "{465FB100-A08C-4E4F-A321-EC85C5C177B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BytexDigital.Steam", "BytexDigital.Steam\BytexDigital.Steam\BytexDigital.Steam.csproj", "{6E75A863-F718-4374-94B7-97B480F9E274}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -38,6 +40,10 @@ Global
{65FDF864-BF9B-414A-A6E6-3473BCFB62BE}.Release|Any CPU.Build.0 = Release|Any CPU
{465FB100-A08C-4E4F-A321-EC85C5C177B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{465FB100-A08C-4E4F-A321-EC85C5C177B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E75A863-F718-4374-94B7-97B480F9E274}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E75A863-F718-4374-94B7-97B480F9E274}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E75A863-F718-4374-94B7-97B480F9E274}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E75A863-F718-4374-94B7-97B480F9E274}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 3 additions & 1 deletion FASTER/FASTER.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
<PackageReference Include="BytexDigital.Steam" Version="0.8.2-preview.1688347297" />
<PackageReference Include="FontAwesome.WPF" Version="4.7.0.9" />
<PackageReference Include="LiveCharts.Wpf" Version="0.9.7" />
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
Expand All @@ -73,4 +72,7 @@
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BytexDigital.Steam\BytexDigital.Steam\BytexDigital.Steam.csproj" />
</ItemGroup>
</Project>
22 changes: 13 additions & 9 deletions FASTER/ViewModel/SteamUpdaterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@

using Microsoft.AppCenter.Analytics;

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Threading;

namespace FASTER.ViewModel
Expand Down Expand Up @@ -446,7 +441,7 @@ public async Task<int> RunModsUpdater(ObservableCollection<ArmaMod> mods)
{
ManifestId manifestId = default;

if(mod.LocalLastUpdated > mod.SteamLastUpdated)
if(mod.LocalLastUpdated > mod.SteamLastUpdated && mod.Size > 0)
{
mod.Status = ArmaModStatus.UpToDate;
Parameters.Output += $"\n Mod{mod.WorkshopId} already up to date. Ignoring...";
Expand Down Expand Up @@ -611,8 +606,12 @@ private async Task Download(IDownloadHandler downloadHandler, string targetDir)
if (tokenSource.IsCancellationRequested)
tokenSource = new CancellationTokenSource();

Task downloadTask = downloadHandler.DownloadToFolderAsync(targetDir, tokenSource.Token);

Task downloadTask = Task.Run(async () =>
{
await downloadHandler.SetupAsync(targetDir, file => true, tokenSource.Token);
await downloadHandler.VerifyAsync(tokenSource.Token);
await downloadHandler.DownloadAsync(tokenSource.Token);
});

Parameters.Output += "\nOK.";

Expand Down Expand Up @@ -694,7 +693,12 @@ private async Task DownloadForMultiple(IDownloadHandler downloadHandler, string
};
downloadHandler.DownloadComplete += (_, _) => Parameters.Output += "\n Download completed";

Task downloadTask = downloadHandler.DownloadToFolderAsync(targetDir, tokenSource.Token);
Task downloadTask = Task.Run(async () =>
{
await downloadHandler.SetupAsync(targetDir, file => true, tokenSource.Token);
await downloadHandler.VerifyAsync(tokenSource.Token);
await downloadHandler.DownloadAsync(tokenSource.Token);
});

Parameters.Output += "\n OK.";

Expand Down

0 comments on commit 9d2dc65

Please sign in to comment.