Skip to content

Commit

Permalink
Fix Version Checking and Change Data URL (#7)
Browse files Browse the repository at this point in the history
This was happening, stupid. Especially in Debug, why was this check
occurring in Debug, when you know for a fact the version doesn't matter?


![image](https://github.com/user-attachments/assets/50de040b-789f-46d3-9a10-4a42bb59d667)
  • Loading branch information
DEATHB4DEFEAT authored Dec 20, 2024
1 parent 5ca238f commit 324cf60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 7 additions & 4 deletions SS14.Launcher/ConfigConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ namespace SS14.Launcher;

public static class ConfigConstants
{
public const string CurrentLauncherVersion = "51";
public static readonly bool DoVersionCheck = true;
public const string CurrentLauncherVersion = "1.0.2";
#if RELEASE
public const bool DoVersionCheck = true;
#else
public const bool DoVersionCheck = false;
#endif

// Refresh login tokens if they're within <this much> of expiry.
public static readonly TimeSpan TokenRefreshThreshold = TimeSpan.FromDays(15);
Expand Down Expand Up @@ -50,8 +54,7 @@ public static class ConfigConstants
]);

private static readonly UrlFallbackSet LauncherDataBaseUrl = new([
"https://launcher-data.cdn.spacestation14.com/",
"https://launcher-data.fallback.cdn.spacestation14.com/",
"http://assets.simplestation.org/launcher/",
]);

public static readonly UrlFallbackSet RobustBuildsManifest = RobustBuildsBaseUrl + "manifest.json";
Expand Down
2 changes: 0 additions & 2 deletions SS14.Launcher/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ private async Task CheckLauncherUpdate()
{
// await Task.Delay(1000);
if (!ConfigConstants.DoVersionCheck)
{
return;

Check warning on line 175 in SS14.Launcher/ViewModels/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected

Check warning on line 175 in SS14.Launcher/ViewModels/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected
}

await _infoManager.LoadTask;
if (_infoManager.Model == null)
Expand Down

0 comments on commit 324cf60

Please sign in to comment.