Updater: Remove InstallationTime

This commit is contained in:
Kamil Trzcinski 2023-07-05 00:59:26 +02:00
parent 3fb344b89c
commit 1aaf98b4fa
3 changed files with 2 additions and 33 deletions

View file

@ -220,11 +220,6 @@ namespace CommonHelpers
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)

View file

@ -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

View file

@ -236,34 +236,7 @@ namespace Updater
{
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 "";
}
}