mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-21 15:15:48 +02:00
Remove GC reload & threshold option migration code
This commit is contained in:
parent
663d0a633e
commit
8b54fbdb2f
@ -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");
|
||||
|
||||
|
@ -116,8 +116,8 @@ private static void Main(){
|
||||
}
|
||||
}
|
||||
|
||||
SystemConfig = SystemConfig.Load(SystemConfigFilePath);
|
||||
ReloadConfig();
|
||||
SystemConfig = SystemConfig.Load(SystemConfigFilePath);
|
||||
|
||||
if (Arguments.HasFlag(Arguments.ArgImportCookies)){
|
||||
ExportManager.ImportCookies();
|
||||
|
Loading…
Reference in New Issue
Block a user