From 1aaf98b4faab798012c62a0746747f3f1cbd7bcb Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 5 Jul 2023 00:59:26 +0200 Subject: [PATCH] Updater: Remove `InstallationTime` --- CommonHelpers/Instance.cs | 5 ----- RELEASE.md | 1 + Updater/Program.cs | 29 +---------------------------- 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/CommonHelpers/Instance.cs b/CommonHelpers/Instance.cs index efcc111..dc0d33e 100644 --- a/CommonHelpers/Instance.cs +++ b/CommonHelpers/Instance.cs @@ -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) diff --git a/RELEASE.md b/RELEASE.md index bc66edb..9619768 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -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 diff --git a/Updater/Program.cs b/Updater/Program.cs index e961ea4..9ec69c8 100644 --- a/Updater/Program.cs +++ b/Updater/Program.cs @@ -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 ""; } }