From 8b54fbdb2fba5d3175bf78f9d6cd5803307f8a68 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Tue, 22 Aug 2017 03:53:59 +0200
Subject: [PATCH] Remove GC reload & threshold option migration code

---
 Configuration/UserConfig.cs | 10 ----------
 Program.cs                  |  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/Configuration/UserConfig.cs b/Configuration/UserConfig.cs
index 65cfb271..1dd4b295 100644
--- a/Configuration/UserConfig.cs
+++ b/Configuration/UserConfig.cs
@@ -14,16 +14,6 @@ sealed class UserConfig{
         private static readonly FileSerializer<UserConfig> Serializer = new FileSerializer<UserConfig>{ HandleUnknownProperties = HandleUnknownProperties };
 
         private static void HandleUnknownProperties(UserConfig obj, Dictionary<string, string> data){
-            if (data.TryGetValue("EnableBrowserGCReload", out string propGCReload) && data.TryGetValue("BrowserMemoryThreshold", out string propMemThreshold)){
-                if (bool.TryParse(propGCReload, out bool isGCReloadEnabled) && isGCReloadEnabled && int.TryParse(propMemThreshold, out int memThreshold)){
-                    // SystemConfig initialization was moved before UserConfig to allow for this
-                    // TODO remove the migration soon
-                    Program.SystemConfig.EnableBrowserGCReload = true;
-                    Program.SystemConfig.BrowserMemoryThreshold = memThreshold;
-                    Program.SystemConfig.Save();
-                }
-            }
-
             data.Remove("EnableBrowserGCReload");
             data.Remove("BrowserMemoryThreshold");
 
diff --git a/Program.cs b/Program.cs
index ea3ec3bc..e813bb7d 100644
--- a/Program.cs
+++ b/Program.cs
@@ -116,8 +116,8 @@ private static void Main(){
                 }
             }
             
-            SystemConfig = SystemConfig.Load(SystemConfigFilePath);
             ReloadConfig();
+            SystemConfig = SystemConfig.Load(SystemConfigFilePath);
 
             if (Arguments.HasFlag(Arguments.ArgImportCookies)){
                 ExportManager.ImportCookies();