Small fix
This commit is contained in:
parent
7af8d8aa70
commit
9da2a44eff
@ -7,6 +7,7 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -406,6 +407,12 @@ namespace AppScaffolding
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class FilterState_6_6_9
|
||||||
|
{
|
||||||
|
public bool UseDefault { get; set; }
|
||||||
|
public List<string> Filters { get; set; } = new();
|
||||||
|
}
|
||||||
|
|
||||||
public static void migrate_to_v11_5_0(Configuration config)
|
public static void migrate_to_v11_5_0(Configuration config)
|
||||||
{
|
{
|
||||||
// Read file, but convert old format to new (with Name field) as necessary.
|
// Read file, but convert old format to new (with Name field) as necessary.
|
||||||
@ -431,8 +438,8 @@ namespace AppScaffolding
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (JsonConvert.DeserializeObject<QuickFilters.OldFilterState>(File.ReadAllText(QuickFilters.JsonFile))
|
if (JsonConvert.DeserializeObject<FilterState_6_6_9>(File.ReadAllText(QuickFilters.JsonFile))
|
||||||
is QuickFilters.OldFilterState inMemState)
|
is FilterState_6_6_9 inMemState)
|
||||||
{
|
{
|
||||||
// Copy old structure to new.
|
// Copy old structure to new.
|
||||||
QuickFilters.InMemoryState = new();
|
QuickFilters.InMemoryState = new();
|
||||||
|
|||||||
@ -14,12 +14,6 @@ namespace LibationFileManager
|
|||||||
|
|
||||||
public static event EventHandler? UseDefaultChanged;
|
public static event EventHandler? UseDefaultChanged;
|
||||||
|
|
||||||
public class OldFilterState
|
|
||||||
{
|
|
||||||
public bool UseDefault { get; set; }
|
|
||||||
public List<string> Filters { get; set; } = new();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FilterState
|
public class FilterState
|
||||||
{
|
{
|
||||||
public bool UseDefault { get; set; }
|
public bool UseDefault { get; set; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user