Skip to content

Commit

Permalink
Updater: Remove InstallationTime
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Jul 4, 2023
1 parent 3fb344b commit 1aaf98b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
5 changes: 0 additions & 5 deletions CommonHelpers/Instance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@ public static bool HasFile(String name)
return File.Exists(uninstallExe);
}

public static bool AcceptedTerms
{
get { return HasFile("Uninstall.exe"); }
}

private static System.Timers.Timer? updateTimer;

public static void RunUpdater(string Title, bool user = false, int recheckIntervalHours = 24)
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- FanControl: Support `0xB030/0xA` device
- SteamController: `DS4` backpanel and haptic settings are part of Release build
- Updater: Remove `InstallationTime`

## 0.6.18

Expand Down
29 changes: 1 addition & 28 deletions Updater/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,34 +236,7 @@ public static string InstallationTime
{
get
{
try
{
using (var registryKey = Registry.CurrentUser.CreateSubKey(@"Software\SteamDeckTools", true))
{
var installationTime = registryKey?.GetValue("InstallationTime") as string;
if (installationTime is null)
{
var previousTime = RegistryUtils.GetDateModified(
RegistryHive.CurrentUser, @"Software\SteamDeckTools");
Log.TraceLine("PreviousTime: {0}", previousTime);
previousTime ??= DateTimeOffset.UtcNow;

registryKey?.SetValue("InstallationTime", previousTime.Value.ToUnixTimeMilliseconds());
installationTime = registryKey?.GetValue("InstallationTime") as string;
}

if (!Instance.AcceptedTerms)
{
return "";
}

return installationTime ?? "";
}
}
catch (Exception e)
{
return "";
}
return "";
}
}

Expand Down

0 comments on commit 1aaf98b

Please sign in to comment.