mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2025-12-06 07:12:01 +01:00
Updater: Remove InstallationTime
This commit is contained in:
parent
3fb344b89c
commit
1aaf98b4fa
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue